Git/SVN Repository Management and Viewing Code
DevOps in ZenTao integrates Git and SVN repository management.
After the integration is completed, you can:
- Maintain repositories for Git and SVN
- Synchronize code with Git and SVN
- View the code directory
- View code
- Diff
- Blame
- View the code submitted according to the instruction on the Task, Bug, and Requirement details page
Next, we will introduce these features above in detail.
1. Maintaining Git repository
1.1 Create a Git-type repository
Click the Create button on the top right corner.
Product: Could be one or more products
Type: Git
Client Path (Desktop Path): Generally fill in the default /usr/bin/git
The desktop version needs to be checked for safety reasons, please write the version in the file and run the command directly.
Privilege: Authorized users can view the repository if Group and User are left blank. If the Group and User are filled in, only the Group list and User list members can access.
1.2 Edit and delete a Git-type repository
After the Git-type repository is created it will jump to the Code menu and start synchronizing the code.
You can view the newly added Git-type repositories on the list.
You can also edit and delete through the action buttons on the right side of the repository list.
1.3 Browsing code in Git-type repositories
After the Git-type repository code is synchronized, you can view it under the Code menu.
You can view the code of different branches and the code directory.
2. Maintain SVN type repository
2.1 Create an SVN type repository
Click the Create button on the top right corner.
Product: Could be one or more products
Type: SVN
Client Path (Desktop Path): Generally fill in the default /usr/bin/git
Path: SVN Path
Desktop Path: Generally fill in the default /usr/bin/svn
Username and Password: Fill in the user name and password to access the SVN
Privilege: Authorized users can view the SVN repository if Group and User are left blank. If the Group and User are filled in, only the Group list and User list members can access.
The desktop version needs to be checked for safety reasons, please write the version number in the file and run the command directly.
2.2 Synchronize and view SVN repository code
After the repository is created it will jump to the Code menu and start synchronizing the code.
After the code synchronization is completed, you can view it now.
2.3 Edit and delete an SVN repository
You can view it in the repository list if the SVN is created successfully.
The repository can be edited and deleted through the operation buttons on the right.
3. Synchronize the Git/SVN repository code
3.1 Manual refresh and synchronize
The last update time is shown in the top right corner.
Click Refresh to synchronize.
3.2 Regular tasks synchronization
3.21 Utilize Cron in ZenTao system
Go to More--Admin--System--Cron to check if the status of Synchronize with Git and Synchronize with SVN are working normally.
Notice: The following operations need to be done after the modification: More--Admin--System--Cron Off =>> Restart Apache =>> More--Admin--System--Cron Active
3.22 Utilize Cron built-in the operation system
Windows: Control panel--Plan and Task
Linux: Crontab
4. View Git/SVN repository code
4.1 View
You can view the Directory, Revision, Commit Date, Committer, and Comments.
4.2 Blame
Click the Blame button of the code page to view the Revision, Committer, and the specific code information.
4.3 Diff
Click Diff and then the differences can be compared both in-line and parallel.
5. Deploy rules
There is the default command configuration for tasks, bugs, and requirements, and you can also modify and adjust them according to your requirements.
The code submitted according to the configuration instructions will be reflected in the history of tasks, bugs, and requirements.
Instruction settings page and example:
In the task history, you can click view diff to view directly.
On the Bug details page, you can click view diff in the history record to view directly.