Take you to the visual studio--to efficiently manage your code

Source: Internet
Author: User
Tags svn client version control system tortoisesvn

The previous article takes you to the visual studio--with your efficient development through the VASSISTX excellent plug-in explanation, let us master the rapid development of C + + code skills. However, most of the programs are not developed by a single person, and are developed by a team of individuals, and large systems may also be developed by a number of different teams. When multiple people collaborate on development, code management becomes important and requires the aid of code management tools, also known as version control systems .

The current mainstream version control system is:
CVS: is a free software for code versioning, it is a relatively early tool, because it has a lot of its own flaws, is now almost replaced by SVN.
**SVN:**SVN is the abbreviation for subversion, which is a centralized version control system. SVN inherits the basic idea of CVS, which contains almost all of the functionality of CVS. You can assume that SVN is an upgraded version of CVS (but in fact they are totally two software).
The **git:**git is a distributed version control system. It's a git-based code-hosting platform that you know about GitHub when you've played open source code.
For the difference between SVN and Git, refer to: Five basic differences between Git and SVN

This article assumes that you have a basic understanding and mastery of SVN, and use the TORTOISESVN Client for code migration, selection, update and other functions for team collaboration development. If you do not have this knowledge, it is recommended to consult other relevant information before you have a general understanding of SVN to read this article.

Brief introduction of VISUALSVN and download and installation

VS2010 has a self-contained version management tool, which is the team (teamwork) in the menu, but the people used should know that it is very difficult to use and have been dumped several blocks compared to SVN and git.
So a lot of companies or teams will choose SVN for code management, install an SVN client to move in and out. But perhaps few people know that there is a plugin on vs that will help us better use SVN, which is visualsvn.

VISUALSVN is a plug-in that is used on Visual Studio, SVN's client tortoisesvn (SVN has a server servers for centralized management of the repository, and a client that is used by every member of the team to access the repository, Commit code, move out code, and so on. ) is a version control tool. VISUALSVN is based on TortoiseSVN, that is visualsvn to invoke the functionality of TORTOISESVN software, so to use VISUALSVN, VISUALSVN and TORTOISESVN must be installed at the same time.

Download

VISUALSVN's official:
https://www.visualsvn.com/visualsvn/download/
SVN's official:
Http://tortoisesvn.net/downloads.html
* * Note: The version of **SVN is to correspond to the VISUALSVN version, that is, to download the SVN version recommended for the given VISUALSVN version. If the SVN version available for VisualSVN5.1.2 is 1.8.x, 1.9.x, the proposed SVN version is TortoiseSVN 1.9.2.

Installation

Installation of this is very simple, usually first installed TORTOISESVN and then installed VISUALSVN. Choose the default settings, this is not much to say.

Common functions of VISUALSVN uploading a project to the server

The setup of the SVN environment is another topic, you can find the relevant information on your own, this is only about vs related things. You can also refer to this article: The SVN environment under Windows to build a detailed, personally feel that writing can be. If you have a built-in SVN environment in your company, you just need an address where the code is stored.

Now suppose you have set up the SVN environment, there is an SVN work address: Svn://localhost/cpprepos (This is my SVN machine server's library address, the remote server's address is the same), there is an SVN username (Luoweifu) and password ( Svn_luoweifu). Now to the machine D:\CppWorkspace\DesignPattern under the Designpattern project upload to the server, later under the VS2010 to develop the project and in VS2010 to submit and update the code. The basic operating procedures are as follows:

  1. Open the Designpattern project with VS2010. After installing the VISUALSVN plugin, there will be one more menu item visualsvn on vs.
  2. Select Menu Visualsvn\add solution to Subversion ...

  3. Select the local path to add the project, usually automatically set for you, if the path is correct, one step directly.


    Figure 1:add Solution to Subversion 1

  4. Here we choose existing Repository, because we already have an SVN address, if the server does not create a corresponding library, you can choose new Repository to create an additional library.


    Figure 2:add Solution to Subversion 2

  5. Fill in your SVN address here: Svn://localhost/cpprepos


    Figure 3:add Solution to Subversion 3

  6. Click Import on it, then your vs will have a Pending changes view, if not view\other windows\pending changes dish monotonous out. This view will display all the files you want to add to the server.


    Figure 4:add Solution to Subversion 4

  7. Import only maps the local file to the address on the server and does not actually upload the file to the server. You need to submit all the files (commit), which is really uploaded to the server. Select all the files in pending changes and right-click Commit.


    Figure 5:add Solution to Subversion 5

  8. The bottom of the dialog box displays all the files you want to submit, and you can check which files you want to submit or not submit. Write the reason or remark you submitted (this is important, be sure to have this habit so that you can see what you did when you view the history), then click OK.


    Figure 6:add Solution to Subversion 6

  9. The first commit will require you to enter your username and password, enter your SVN username and password.


    Figure 7:add Solution to Subversion 7

Main functions of VISUALSVN

VISUALSVN has almost all the functions of TORTOISESVN, its role is to integrate TORTOISESVN into VS, so that code encoding, code management can be done in one IDE, Instead of having to switch to tortoisesvn every time you commit or update your code. This is similar to Java's myeclipse, Intellij idea's SVN plugin.

After adding the VisualSVN plugin, the VisualSVN menu will have almost all of the TORTOISESVN features. such as adding solution to the server, getting solution from the server, updating the code, committing the code, branching, merging branches, etc. These functions as long as you have a general understanding of SVN, modulo Somoso will be used, no longer too much introduction.


Overall view of Figure 8:VISUALSVN
The Pending chages view displays all newly added, deleted, or changed files.
Solution Explorer view files in different states are also labeled with dots of different colors: Green indicates files that have not been changed, and yellow indicates changes or newly added files.

C + + Project Upload server to ignore files

I'm taking you to the visual studio--take you to a new project in the article about the various types of files in C + + engineering, and then we have many files and directories in the version control of the code that do not need to be uploaded to the server. Because the server only needs to save some useful data and files, some useless auxiliary files (such as PCH files, debug directories, etc.) will only burden the server and management. The types of files that need to be uploaded and not uploaded are listed here.

Types of files to upload:

H: Header File
CPP: Source file
TXT: documentation, such as Readme
RC: Resource File
RC2: Resource File
ICO: icons, such as logos, etc.
SLN: Solution Engineering files
Vcxproj: Engineering Documents
Filters: File Filter

Do not upload the file type

Debug, release and other compiled structure directory
IPCH Directory
Aps:last Resource Editor State
Exe:build result
Idb:build State
Ipch:build Helper
Lastbuildstate:build Helper
Lib:build result. Can is 3rd party
Log:build Log
Manifest:build Helper. Can be written yourself.
Obj:build Helper
Pch:build Helper
Pdb:build result
Res:build Helper
Sdf:intellisense dbase
Suo:solution user Options
Tlog:build Log
User:debug settings. Do preserve if just one dev or custom debug settings

If you manage with TORTOISESVN, you need to manually add the Ignore property to ignore the files that you do not need to upload. In your project directory, right-click->tortoisesvn->properties->new->other, Pop-up dialog box in property name Select Svn:ignore,property The value is filled in with the content to be ignored (can be used here), such as.


Figure 9: Add Ingore Property
With VISUALSVN upload solution, the default will help you set up, will not need to block the file. This is also a big benefit of VISUALSVN.

Previous review:
Take you to the visual studio--with your efficient development

What to tell NEXT:
Take you to the visual studio--take you to manage a variety of release publications

Copyright NOTICE: This article for Bo Master original article, without Bo Master permitted not for any commercial use, reproduced please indicate the source.

Take you to the visual studio--to efficiently manage your code

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.