SVN usage Explained

Source: Internet
Author: User
Tags tortoisesvn

Svn
SVN = version control + Backup server.
A Svn
Each upload a server file content, it will automatically give each change a version, we used to store the upload file is called Repository, the first time there is a new file action, will want to back up the file on the repository above, In the future we have any changes can be uploaded to repository above, upload the existing and modified file is called Commit, each upload is given to it a new version, at the same time, it will be uploaded to the date of the upload, in the future need to download the file submitted from repository, You can extract the latest version and any previous version, and you can also extract the desired version based on the date.
Two How SVN works
SVN is a centralized sharing of information system, its core is the repository, the repository of all the data, the repository according to the file tree to store data (including files and directories), any number of clients can connect to the repository, read and write these files, modify these files.
The file tree structure is as follows
| 2014.12.3
| |aa.txt
| |xx.txt
| 2014.12.4
| |aa.txt
| |xx.txt
| 2014.12.5
| *
| *
Three About SVN features
1.repo-browser: Repository Browsing:
2.ShowLog: Show log: Displays items that were previously submitted.
3.CheckOut: Click the popup box and enter the server warehouse address in the URL of repository input box.
Enter the path to the local working copy in the Checkout directory input box and click OK to extract the configuration library from the server
4.Check for modifications: Check for updates
5.Revision Graph: Version Branch chart
6.Resolved: Conflict Resolution: If there are conflicts on the current working copy and the repository and cannot be merged automatically, then when you commit the changes, 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.
7.Update to Revision: Update 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.
8.Revert: Rollback: If you make some changes to the working copy, but you don't want it, you can use this option to undo the changes you made.
9.Cleanup: Clear Status: If there is any problem with the 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.
10.getlock/releaselock: Locking/unlock: If you don't want someone else to modify a file, you can lock the file so that only you have the right to modify the file. Unless you release the lock, others cannot commit any modifications to the configuration library.
11.branch/tag: Branch/Tag: 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 Linux hard link (the same file can exist in two places, delete one does not affect the other, the changes will affect the other), To manage files, rather than simply copying copies of a file, there is no problem of wasting storage space.
12.Switch: Switch: After the file Creation branch, you can choose to work in the trunk, or in the branch to work, this time you can switch through switch.
13.Merge: Merge: Trunk and branch versions are merged, in source and destination each input file path, version number, click OK. The system merges the files and, if there is a conflict, refer to conflict resolution.
14.Export: Export: Export the entire working copy to a local directory, the exported files will not have the SVN file flag, the files and folders do not have a green "√" symbol.
15.Relocate: Relocation: 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
16.Add to Ignore list: Added to ignore lists: 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.
17.Relocate: Repository transfer: This feature is needed when our repository has been 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.
18.Create Patch: Create patches: Create patches. If the administrator does not want anyone to submit the changes casually, but will have to be audited to make changes, then others can create a patch, the modification information (patch file) to the administrator, the administrator after the audit, you can use the Apply patch to submit the changes.
19.Apply Patch: Submit a patch.
20.Properties: Properties allow users to invent arbitrary names of versioned and non-versioned properties on a file or directory, the only limitation being that "SVN:" is the reserved prefix of subversion itself, which the user can set to change the way subversion behaves. User cannot invent new "svn:" attribute
21.SETTING:SVN settings
22.about: Information about the SVN version
23.help: Help with SVN usage.
24.ADD: Add files that are not versioned to version control.
25.Delete: Delete the files on the server.
26.Rename: Renaming files
28.Import: Import the non-versioned files to the repository and add the same.
29.showlog->compare with working copy: The working copy differs from the specified file version.
30.showlog->show changes as unified diff: View the selected version as a single diff file.
31.showlog->compare With Previous revision: Compare the selected and previous versions, for folders, this option first displays the Modified file dialog box so that you can select the files to compare.
32.showlog->browse repository: Open the version browser, check the selected file or directory in the repository based on the selected version
33.showlog->create Branch/tag from Revison: establishes a branch/tag from the selected version.
34.showlog->update Item to revision: Updates your working copy to the selected version.
35.showlog->revert changes from this revision: Restores the changes made to the selected version. Restoring content is only available in your working copy, and will not affect the repository until it is submitted.
36.showlog->revert to this revision: Revert to the selected version and restore the content only in your working copy, without affecting the repository until it is submitted.
37.showlog->merge Revison to: Select the merged version to the specified path.
38.showlog->checkout: Extracts the specified version content confirmation URL and version to the specified path to save.
39.showlog->export exports the specified version of the content confirmation URL and version to the specified path to save.
40.showlog->edit Author/log Message: Edit the log information of the previous commit or the author
41.showlog->show Revision Properties: View and edit any version properties, not just log messages and authors.
42.showlog->copy to Clipboard: Specify version copied to clipboard
43.showlog->search log messages: Finds content in the specified version.
(iv) Causes of conflict:
Two open people extract a file at the same time and modify the same place at the same time. The subsequent party commits a conflict in the copy copy. (It's a good idea to update the version before submitting it)
(v) When a conflict occurs, SVN generates three temporary files
1.filename.mine Storage of locally modified files
2.filename.roldrev storing the underlying version file of the last update
3.filename.rnewrev Store the version that the client has just received from the server
(vi) 3 Methods of conflict resolution
1. Manually merge code to resolve conflicts
2. Select a temporary folder that is generated when a conflict occurs to overwrite the current file.
3. Run the SVN resolved filename command to discard any local changes to the current file.
After resolving the conflict you have to tell SVN that you have resolved the conflict and SVN will delete the 3 temporary files.

SVN usage Explained

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.