Some of the concepts of SVN

Source: Internet
Author: User
Tags commit diff svn versions tortoisesvn

Check for modifications (checking for updates)
Click Check for modifications, system list so the status of the files and folders to be updated.

Revision Graph (Version branch chart)
View the branch of the file, the version structure, you can click Revision Graph, the system graphically displays the version of the branch.

Rename (renamed)
SVN support file Renaming, click Rename, pop-up file name input box, enter a new file name, click OK, and then submit the changes, you can complete the file renaming

Delete (remove)
SVN support file deletion, and easy to operate, convenient, select the file to delete, click Delete, and then submit the delete operation to the server

Moving (MOBILE)
Select the files and folders to be moved, press and hold right-drag the Right-drag file (clip) to a new place in the tracking copy, release the left button, and select Move files in the pop-up menu.

Revert (Restore)
Restore operation, such as the file has been deleted, now restore it back, click Delete, then click Submit, will appear as on the Prompt box, click Delete, then click Revert, that has been revoked delete operation, if this time click Submit, then the system pop-up Prompt box: No file was modified or added, can not be submitted


Merge (Consolidated)
The trunk and branch versions are merged, the path of the input files in the source and destination, the version number, click OK. The system merges the files and, if there is a conflict, refer to conflict resolution.

Export (exporting)
Export the entire work copy to a local directory, the exported file will not have the SVN file flag, the files and folders do not have a green "√" sign.

Relocate (reposition)
When the file vault directory on the server has changed, we can reposition the working copy and enter the new address in the To URL input box

Add to Ignore list (added to ignore list)
Most projects will have some files (clips) that do not require versioning, such as compile-generated *.obj, *.LST, etc. Each time you send, tortoisesvn tips those files do not need to control, very annoying. These files can be added to the Ignore list at this time.

SVN commit (version submission)
Commit the changes you made to your work copy to the repository so that others can see your changes when they get the latest version (update).

Show log (shows logs)
Displays the history of all modifications to the current file (clip). SVN supports file and folder-independent version traceability.


Repo-browser (view current repository)
View the current repository, this is the TortoiseSVN view repository of the portal, through this menu item, we can go to the configuration library of the resource manager, and then we can manage the Configuration Library folder, the equivalent of we open My computer for file management.

Revision Graph (Version graphics)
View the Revision history icon for the current project or file. If the project is large, it will usually build multiple branches, and multiple milestones (stable release), through which we can see the full picture of the project.

Resolved (conflict resolution)
If there is a conflict between the current working copy and the repository and cannot be merged automatically, then when you commit the change, TORTOISESVN will prompt you for a conflict, and you can resolve the conflict by this menu item. There are two kinds of conflict resolution, one is to keep a copy, such as using a configuration library to overwrite the current working copy, or vice versa. There is also a manual resolution of the conflict, for a text file, you can use TortoiseSVN's own tool, it will list where there are conflicts, and then you can discuss with the submitter how to resolve the conflict. It also has a good support for word.

Update to Revision (updated to version)
Get a version of a history from the repository. This feature is primarily useful for viewing historical versions, rather than rolling back versions. Note: No action is recommended for this file after it has been obtained. If you make a change, then when you submit SVN will prompt you, the current version is invalid (that is, not the latest version), unable to submit, you need to update first. So the changes you've made are in vain.

Revert (rollback)
If you've made some changes to your work copy, but you don't want it, you can use this option to undo your changes. If you have any problems with your current working copy, you can use this option to correct it. For example, some files are originally version-controlled, but you did not delete them directly by TORTOISESVN, But TortoiseSVN still retains the original information (there is a. svn hidden folder under each folder that holds the version information for all folders under the current folder) so this creates some conflicts. You can use the cleanup to clean up a bit.

Getlock/releaselock (locking/unlock)
If you don't want someone else to change a file, you can lock the file so that only you have the right to modify the file. Unless you release the lock, someone else cannot commit any changes to the configuration library in Branch/tag (Branch/label)
Branch is the meaning of the branch. For example, when designing a thing, different people have different implementations, but no practice test, who do not want to directly cover the other people's design, so can lead to different branches. You can merge these branches in the future if you want.

Tag is the meaning of marking. Usually when the project is developed to a certain extent, it can be run stably, it can be labeled as a stable version. In the future can be convenient to find a specific version (of course we can also use the version number to find, but the number is not convenient)

SVN for branches and tags are similar to the way Linux hard links (the same file can exist in two places, delete one does not affect the other, the modification will affect the other), to manage the file, rather than simply copy a copy of the file, so there will be no wasted storage space problems exist.

Generally tag/branch and switch functions are used together. After you've finished branching or tagging, you can choose to work in the trunk or branch, and you can switch by switch.


Export (exporting)
This feature is handy for our deployment. When we need to publish a stable version, we can use this feature to export the entire project to a folder, and the new folder will not contain any version information.


Relocate (repository transfer)
This feature is required when our repository is transferred. For example, my original repository was built on a USB flash drive and is now transferred to the development server (copying the entire Configuration Library folder), using HTTPS instead of the file system access. Therefore, the target repository of the original working copy needs to be relocated to the development server.


Create/apply Patch

After checkout the next version, create a patch after the modification, which is a snapshot of the current change, except that the snapshot is not a full backup, but a differential backup, and the resulting patch file retains the version information for checkout. And where the files were modified. After the patch has been created, apply will be able to restore the last version of checkout to the backup of the snapshot.

Equivalent to being submitted locally once. I tried, if the patch file is recorded in the checkout version is lower, and the local workcopy version of the checkout is relatively high, this time in the Apply Patch will insert the contents of the file modification into the location between the checkout version of the patch file and the current checkout version. The scenario where patches were previously seen on the web was that if leader didn't want anyone to commit the changes, but had to go through an audit to make the changes, others could send the changes (patch files) to leader by creating patches, You can use the Apply patch to submit this modification after the leader review has passed.

(diff and Patch are a pair of tools, mathematically, diff is a difference operation for two sets, and patches are two sets and operations.) Diff compares the differences between two files or two sets of files and logs them down to generate a diff file, which is what we often call patch files, which are patches.

Diff can be followed by two file names or two directory names, if it is two directories, for all files under the directory, not recursive, if we want to execute recursively, we need to use the-R parameter. command diff a B > C, General A is the original file, B is the modified file, and C is the patch file. In other words, a file after C patch to get B file.

Patches, in contrast, generate target files based on the original files and patch files. The patch is patched. Patch a B is able to go to C, which is called a b patch on file a. If you want to recover from the target file to a file, Patch-r C B. In fact, patch specific use when the original file is not specified. PATCH-PN <c,)


PostScript: The main reason to write this article is to listen to a lecture about SVN today, but did not understand that patch is what to use, so the east search copy, write down this article.
In the words of today's presenter, SVN is a very simple tool that is designed for programmers. There are not many fancy features compared to commercial software such as clear case. At present, the main reason we use SVN here is that SVN can integrate with Ant, and SA is easy to update after the Lin is compiled. The most advantageous aspect of personal feeling relative to CVS and VSS is that there are branching functions and inheritance. Instead of CVS or VSS, there is only one main line that feels more suitable for relatively stable versions of control than for development control. As for the drawback, the most feared is SVN's automatic merging, especially when merging from branch to Trunc, the auto merge feeling is not very reliable.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.