Recently, I participated in a WP7 open-source project launched by wpmind webmaster Zhang Xin.Source codeManagement. Use Visual Studio team explorer to manage sources on codeplexCodeThanks to the materials provided by Zhang Xin.
1.Set
Codeplex supports three methods: Subversion, Visual Studio team explorer, and team explorer everywhere. Go to the source code option page of the project and click the method you selected in the "source control setup" section on the right to view the specific parameter information. The following procedure uses Visual Studio team Explorer as an example.
Open team explorer in Visual Studio (if not, install it on your own) and select connect to Team Project in team explorer ". If your team explorer has not configured any project on codeplex, add the server. For more information about the parameters, see the prompt on codeplex:
Select tfs05 for project collection and wpmind for project name.
Note that if your codeplex user name is zhangsan, your source code management user name is snd \ zhangsan_cp, And the password is the same as your codeplex password.
2. Source Code Acquisition
After the team explorer connects to the wpmind project, the following figure is displayed in team Explorer:
Double-click "Source Control" to open "source control Explorer ". Select the wpmind project in the project list on the left, and click "not mapped" in the "local path" area at the top of the list on the right to set a local ing directory for the project. Right-click the project and select "get last version" to get all the latest code checked in.
3. Check out and modify the code
Open the solution file (wpmind framework for wp7.sln) obtained in step 2, and right-click any file in Solution Explorer and choose check out for edit ..." You can check out the file for modification. Generally, you must first check out the project file (wpmind. wp7.csproj) to add new files to the project.
4. shelve your code
Shelve means to put it on hold. After you modify/Add some code, do not directly check in on the server. The Code should be reviewed by other members of the team. Only when 80% of the members agree to check in your code can the code be checked into the server. This ensures that the server has high-quality code. After the code is modified, right-click the project in Solution Explorer and select "shelve pending changes ...". Create a "shelve" name for your code and add some comments. Then click "shelve" to submit the code to the server "shelve.
5. unshelve and code review
When someone shelve the code, they need to post a post in the Forum to ask everyone to review the code. When reviewing the code, you need to open the project and thenVs2010In the menu, choose "file"> "Source Control"> "unshelve pending changes ...". Then, enter the member ID in the owner name (do not forget the _ CP) and click find to list all the code on hold.
At this time, there are two review methods. For a small number of changes, click the "details" button to list all the code in the shelve:
Select a file, right-click and choose "Compare"-> "with last version ..." This change will be compared with the final code on the server.
Alternatively, you can select the shelving option in the previous shelve list and click "unshelve". The system will check out the local file and change the settings.ApplicationTo your local device. Then you can compile and test it.
6. Discard Modification
Sometimes you want to give up some changes, or you need to give up the changes of the code on your local device after checking the code of someone else's shelve. Right-click the project in Solution Explorer and select "undo pending changes" to discard all changes. And restore your local code to the final version checked in the system.
7. Check in the code
After the code is approved, check in. Right-click the project in Solution Explorer, select "check in", select the file to be checked in, and add comments to submit.