- Click SOURCE CODE from the Project Home menu.
- Select the Repositories tab.
From the list of project repositories, select the repository you want to look at.
Click the name of a Subversion or a Git repository in which you want to view code. On the top right of code browser, you can select the branch/tag (for Git) or specify the revision (for SVN) you want to browse.
To clone the repository, click the clone button ( ) available against each repository in the list.
This tab allows you to do the following:
- Browse through the folder hierarchy of the repository and view the content of specific files. For any folder or file you are viewing within a branch (Git) or revision (SVN), you can obtain the commit information pertaining to its last update.
While viewing a single specific commit or a file, you can see the paths that were modified in that commit, the associations including JIRA such as builds, code reviews and so on (from EventQ events) for the specific commit and the difference between files in that commit.Important: To view the associations, you must have installed EventQ and must have RBAC (role-based access control) permission to use the “EventQ READ” or “Reporting API” of TeamForge EventQ. If either of these requirements is not met, this section will not show up at all.
- While viewing a folder, if there is a file named
readme.md, that file will automatically be rendered beneath the list of files in the folder. If the file contains markdown formatting, it will be rendered as rich text.
With the linking capability, you can refer to a line of code or a range of lines in any revision of the file.
- Inline-edit files in a Subversion Repository. Just browse and open the file (on a Subversion repository) on the View tab. Click Edit, edit the file in the File Editor and click Save.
Inline-edit files on Git repositories without Code Review. You can inline-edit the source files on Git repositories for which code review is not enabled. Browse and open the file on the View tab, click Edit, modify the file on the File Editor and click Save.
Find files as you type. With the Find File feature, you can just type the keywords and the results are shown as you type. Click the Find File icon and type the keyword to find a file you want.
View Git Blame Prior to a Specific Change. You can now view Git blame prior to a particular change. Browse and view a file in a Git repository, select the Annotations check box and click the View Git blame icon.
View PDF files. You can view the PDF files in Code Browser.
View Images stored in Git LFS. You can view the image files stored in Git LFS. Supported formats: GIF, JPEG, and PNG.
Download files. The existing Download tab is replaced by the Download button, which appears next to the Edit button on the Code Browser. Click this button to download source files.
- Support for multiple Git LFS backends in Code Browser. Prior to this Gerrit release 18.3.6-2.14.6, the Code Browser was only able to access LFS files that were stored on local file system (FS backend).
This tab lets you view all of the commits that touched a specific path you are browsing within a branch or revision. Click a commit to view its details.
With more and more number of commits, the Changes tab can typically show a long list of changes. However, if you are looking for specific commits on a particular subject or commits made by a specific committer, you can filter commits further either by the log message, author or by the committer.
Just click Filter and type a keyword to search the log message or type the author or committer name and click Done. The list of commits would be filtered by the criteria you entered. You can clear the filter criteria anytime.
This tab provides a graphical representation of the changes made including branching and merging of repositories.
Branches Tab (for Git)
This allows you to see all of the branches in the repository in their relation to the default (master) one. Using Compare Branch, you can see the commits in the branch that do not exist in the default branch.
This tab lets you create Git tags and tag specific points in history as being important. Typically, you can use this functionality to mark release points (v1.0 and so on) with an option to add Release Notes for the tagged version. Once you create a tag, you can use it to download source code as a zip/tar file and view the tag information in Changes and Graph tabs.
To create Git tags and tag specific points in history as being important (to mark release points, for example, v1.0, and so on), select the TAGS tab and click Create Tag.
Type a tag name and revision number and add a Release Notes for the tag. Click Create Tag.
Once you create a tag, you can use it download source code as a zip/tar file and view the tag information in Changes and Graphs tabs.
This tab lists all the Open, Merged, and Abandoned reviews, both Pull Requests and Gerrit single-commit reviews. Pull requests allow developers to collaborate with each other on a code change before merging it into another branch on a GIT repository. You can access this tab only when the repository owner has enabled this feature. For more information, see Pull Request: Step by Step.
- Support for Both Pull Requests and Single-commit Gerrit Reviews: Supports all types of code review policies, which include Pull Requests and single commit Gerrit Reviews.
- Auto Refresh When a Pull Request Changes: When a pull request changes, the page is automatically refreshed to reflect the changes.
- Comments to Support @mentions: Inline comments are parsed for @mentions and users called out via @mentions are added as reviewers.
- Open Your Gerrit Reviews in Gerrit’s User Interface: A new button has been added to let you open your Gerrit Reviews in Gerrit’s user interface.
- Code Commenting: During code reviews, you can now add line comments in context while looking at the files in diff view. You can double-click to block a line/text and add a comment.
You can also reply to line comments.
- Ability to Diff the Change Against the Base or a Previous Patch Set: As part of the Gerrit review workflow, you now have the ability to diff the change against the Base or a previous Patch Set.
- Markdown Support: Markdown support for all .MD files: Render Markdown files when viewed through Code Browser.
- Mass Delete/Resurrect Options: Mass delete/resurrect options in History Protect tab:
Delete abadoned reviews: To delete an abandoned review, open the review in the code browser and click Delete from Actions.
Inline Editing of Files: Quick changes to files, if required only to few files, can be done using the inline edit feature from within the code browser without having to clone an entire repository. Browse the repository, locate and open the file in the View tab, click Edit to open the file in the File Editor, make your changes, Create code review and Publish your changes for review.
You can add new files to a review and delete files from a review by click the Edit Files icon and then the “+” and “-“ icons respectively.
Type the name of the file to see results matching the file name, select a file and click Add File.
Type the name of the file you want to delete to see results matching the file name, select the file and click Delete File.
Click the Complete File Edits icon.
- Submit Whole Topic: You can now bundle related changes (code reviews) by topic and submit the whole topic for review instead of just submitting changes one-by-one. Just open a review, click the Set Topic link and enter the topic name.
Add Coauthors in Commit Message: The coauthor name is also included as part of the author avatar and Authored by information on the changes list, whenever a change is done to the “Co-authored-by” footer text. More information can be seen in change details view.
- Option to show only files with review comments—By default, all files with or without the code review comments are shown on the Files tab view. Select the check box Commented files only, if you want to see only the list of files that have review comments.
Review comments to unchanged lines of code—Code review comments, added to lines of code that have not been modified as part of the code change, are now visible in the UI.
Improved user experience with review rules
- Active review rules are displayed on the Actions panel.
- Review rules description is added as a tooltip on the Actions panel. The tooltip describes which rule is violated and what steps need to be performed moving forward.
- Hide/Show details for code review comments—Allows toggling visibility for long review comments (having lot of log snippets or images) using the Expand/Collapse option.
This tab lets you search for code via TeamForge Code Search powered by Elasticsearch. You can search all files in a repository or narrow your scope to specific file types such as C, C++, C# and so on. Type your search keyword, select a file extension (optional) and click Search. For more information, see Search Code.
This tab lets you configure the repository settings.