[No000092] SVN learning note 3-import/checkout (move in/out), Getlock (locking)

Source: Internet
Author: User
Tags svn update tortoisesvn

TortoiseSVN client Gets server-side files to the new local folder

1. On the local new folder, right-click menu:

2. Open Repo-browser (you may need to enter your username & password)

3. Enter the server-side SVN (warehouse) address, OK, you can see the server-side directory

@1. You can view data under different version numbers on the service side;

@2. If you want to download a folder or file, right-click checkout;

@3. Some directories you may not have permission.

In the checkout Depth, there are 4 options, namely, to move out all, check out only the next level of subdirectories and files, check out only the files, check out only empty items, the default is the first item.

In the above example, we can also use the Web to access the code base, enter in the browser: SVN server code base address, and then enter your username & password to

4. Click confirm to download the server-side data to the local folder.

When the data download is complete, this folder we call the work Copy folder, open the folder

Where. SVN is a hidden folder, saving data such as File/folder version status.

5. After opening the project file, new, modify the file/folder, the corresponding status will change:

You can set the corresponding icon: right-click tortoisesvn->settings

When you pass commit (commit), sometimes the icon is not changed in time, because of Windows itself problem, at this time, multiple press F5 several times, should be able to solve this problem. If, still not, indicates a problem with your previous commit action.

To ensure that the files in your working directory are synchronized with everyone's files. It is recommended that you update the action before editing. here, let's assume that you have checkout the file (moved out) once. Now it's about how to update in a checkout directory. In the file or directory icon you want to update, press the right mouse button. and select SVN Update.

6. Sometimes we need to go back to a specific date or version, so we can take advantage of the functionality of the SVN update to revision. In the file or directory icon you want to update, press the right mouse button. and choose Svn->update to revision.

Can be traced back to head revision. Of course, you can also choose a specific version. Don't remember the version, choose Show Log to choose one!

Second, TortoiseSVN client plus lock operation

1. If an item is copied by you individually or for a certain period of time by you, you can get lock before each change so that the other person cannot change the file. Otherwise two people will be in trouble to change the same file. A small lock is displayed after the lock! No response on F5 refresh!

2. After the modification, of course, to unlock! Release lock!

Third, check in (upload) the source code to SVN Server

If we use Visual Studio in the folder TEST creates a project in which we want to check the source code of this project into SVN Server in the code base, first right-click TEST folder, when the right-click menu looks like this:

Click Import , the following form pops up

Click OK button, the form will pop up asking for credentials (user name & password)

upload complete. The source code has been successfully checked in to the SVN server. This is when team members can move out of the source code on the SVN server to their machines.

Iv. Submit the modified documents to SVN Server

I modified the location in Model two files in a file ImageInfo.cs and the NewsInfo.cs , the following shows how to submit to SVN server.

Note: When submitting the source code to the server, make sure that the native code is the latest version (now Update ), or it may fail to commit or cause a version conflict.

in the Model Right-click on the folder or Model Right click on the blank in the file and click SVN Commit ... the following form pops up:

Click OK button, the form that pops up like:

v. Add new files to SVN Server

we are Model a new class file is added under the file UserInfo.cs , in Model Right click on the blank in the file and click SVN Commit ... , and the above mentioned commit the modified file to SVN server, you can do it.

In addition, the file can also be UserInfo.cs Right click on the button and click Tortoisesvn=>>add , the form that pops up like:

selected UserInfo.cs file, click OK button so that the file is not submitted to SVN server, simply mark the file as a file in the source Library and set its state to the modified state. After that, we'll have to commit The file again, so that it can actually be submitted to the code base on the svn server.

The above is to add a file, in fact, the steps to add a folder is the same, this is not said.

Six, update the native code and SVN the latest version on the server is consistent

This is also very simple, as long as the need to update the folder right-click or in the blank space under the file right click, click SVN Update , you can do it.

Note: The update operation may fail because of a version conflict, and you can use the merge " Merge "or other means of resolution; Get Lock "and fail, it is necessary to unlock first" Release Lock ".

Rename the file or folder and submit the changes to the SVN Server

just right-click on the file or folder you want to rename and click tortisesvn=>>rename ... , enter a new name in the pop-up form, and click OK button, it's OK. This method is also not directly renamed, but instead marks the name of the file or folder as a renamed name and requires US to commit to svn using svn commit server is not truly renamed.

VIII. Delete the file or folder and submit the changes to Span style= "Font-family:verdana;" >SVN server

The simplest is, you Delete the file or folder , and then use svn Commit submit update to svn server. Another option is to right-click =>>tortoisesvn=>>delete . Span style= "font-family: the song Body;" > delete This method also also requires us to use svn Commit submit to svn The server is not actually deleted.

Description: Actually, since you moved the source code to check in SVN server start, each version of the data and files, even if you have deleted, you can move out at any time.

above is just TortoiseSVN The simplest of several functions, in fact, his function is far more than these, the other features can be used in the process of slowly experience, some features I will be in the following tutorial to use, then will tell you clear usage.

note: to SVN don't commit bin , etc folder, otherwise it will be very troublesome. But web bin web bin The that is generated by referencing other items in the directory. Span style= "Font-family:verdana;" >dll no commits required.

a good habit: if you have references to other third-party assemblies in your project, such as enterpriselibrary , FCKEditor and so on, don't simply reference them from their installation location, but in your solution, add a Library directory, copy the required assemblies here, and then from the Library directory references, So what is the advantage, think about it yourself!

[No000092] SVN learning note 3-import/checkout (move in/out), Getlock (locking)

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.