Take you to the visual studio--to bring you efficient management code

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


The last article to take you to play the visual studio--with your efficient development through the vassistx of excellent plug-ins, let us grasp the rapid development of C + + code skills. However, most of the programs are not developed by one person, and are developed by many individuals of a team, and large systems may be developed by subcontracting of several different teams. When many people collaborate on development, code management is important and requires the aid of a code management tool called a version control system .



The current mainstream version control systems are:
CVS: a free software for code versioning, an early tool that is now almost superseded by SVN because of its many flaws.
**SVN:**SVN is the acronym for Subversion, which is a centralized version control system. SVN inherits the basic idea of CVS and 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).
**git:**git is a distributed version control system. Believe you have played open source code know GitHub bar, it is a git based on the code hosting platform.
For the difference between SVN and git, refer to the 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 code to move, select, Update and other functions of the team's collaborative development. If you do not have this knowledge, it is recommended to first look at other relevant information, to SVN have a general understanding before you read this article. brief introduction of VISUALSVN and download installation



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



VISUALSVN is a plug-in that is used on Visual Studio, SVN client tortoisesvn (SVN has a server for centralizing the repository, and a client side for each member of the team to access the resource pool, Submitting code and moving out of code. ) is a version control tool. VISUALSVN is based on TortoiseSVN, that is, VISUALSVN to invoke the functionality of the TORTOISESVN software, so to use VISUALSVN, you must install both VISUALSVN and TORTOISESVN. Download



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



Install this is very simple, generally install TORTOISESVN before installing VISUALSVN. Select the default settings, this is not much to say. Introduction to the common functions of VISUALSVN upload a project to the server



About the SVN environment is another topic, you can find the relevant information, here only the VS related things. You can also refer to this article: Windows SVN Environment to build a detailed, personally feel that the write can also. If you have an already built SVN environment in your company, you need only one address for your code.



Now suppose you've built SVN's environment and have an SVN job address: Svn://localhost/cpprepos (This is my SVN server's library address, the remote server's address is the same), there is an SVN user name (Luoweifu) and password ( Svn_luoweifu). Now upload the Designpattern project under the D:\CppWorkspace\DesignPattern to the server, then develop the project under VS2010 and submit and update the code in VS2010. The basic operating process is as follows: Open the Designpattern project with VS2010. After installing the VISUALSVN plug-in, a single menu item visualsvn will be on vs.



Select Menu Visualsvn\add Solution to Subversion ...



Select the local path to add the project, and generally will automatically set you up if the path is correct on the direct step.




Here we choose existing Repository, because we already have an SVN address, and if the server does not create a corresponding library, select New Repository to create a newer library.






Here, fill in your SVN address: svn://localhost/cpprepos






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






After import only the local file and the address on the server map, and did not really upload the file to the server. You need to submit all of your files (commit), which is actually uploaded to the server. Select all the files in the pending changes and right-click Commit.






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 down the reasons or notes you submitted (this is important, be sure to have this habit so that you can see what you are doing when you view the history later), and then click OK.






The first submission will require you to enter your username and password and enter your SVN username and password.


main functions of VISUALSVN



VISUALSVN has almost all the features of TORTOISESVN, and its role is to integrate TORTOISESVN into VS, so that code, code management can be done in one IDE, Instead of switching to tortoisesvn every time you submit or update your code. This is similar to the Java MyEclipse, IntelliJ Idea's SVN plug-in.



After adding the VISUALSVN plug-in, the VisualSVN menu will have almost all of the TORTOISESVN features. such as adding solution to the server, getting solution from the server, updating code, submitting code, playing branches, merging branches, etc., as shown below. These features as long as you have a general understanding of SVN, mold Somoso will be used, no longer too much introduction.





The Pending chages view displays all newly added, deleted, or altered files.
The Solution Explorer View also uses a different color dot callout for files in different states: Green indicates a file that has not been changed, and yellow indicates a file that has been altered or newly added.



C + + project Upload server to ignore the files



I'm going to show you how to do it. Visual studio--take you to a new project. The article describes various types of files in C + + engineering, and then we have a lot of files and directories in the version control of the code that don't 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 file, debug directory, etc.) will only bring the server and management burden. This will list the types of files you need to upload and do not need to upload. types of files that need to be uploaded:



H: Header File
CPP: Source Files
TXT: Description file, such as Readme
RC: Resource Files
RC2: Resource File
ICO: icons, such as logos, etc.
SLN: Solution Engineering files
Vcxproj: Engineering Documents
Filters: File type not uploaded by file filter



Debug, release, etc. compilation 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 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 are managing with TORTOISESVN, you need to manually add the Ignore attribute to ignore files that do not need to be uploaded. In your engineering directory, right-click->tortoisesvn->properties->new->other, and select Svn:ignore,property in the name of the dialog box that pops up. value to be omitted (here you can use the wildcard character), as shown in the following figure.

Use VISUALSVN to upload solution, the default will help you set up, will not need to screen the file. This is also one of the great benefits of VISUALSVN.






Previous review:
I'll take you to the visual studio--to bring you high efficiency development



What to tell in the next article:
I'll take you to the visual studio--to get you to release your engineering library.


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.