Open-source projects, SVN...

Source: Internet
Author: User
Tags tortoisesvn

An open-source project (about gta iv, friends who like mod can go and have a look at it if they have time ).

Naturally, I used SVN. for clients, I originally preferred vs2008 team explorer and planned to host this project on codeplex, unfortunately, I had a very slow access speed on CERNET and gave up. I chose Google Code as the platform, but Google Code does not use TFS, that is, it cannot use team explorer. Then we can see a help article on Google Code.ArticleIntroduction to ankhsvn, which can be integrated into the IDE. download and install the SDK but find it unavailable. It may be a problem with my use of the Vista x64 system. It cannot be used anyway. So I switched to tortoisesvn. This software integrated all SVN operations into explorer and managed them using the associated menu!

For SVN, ALT α IR only knows that it can track the changes of things in the working directory, and some things are still learning, such as branch/Tag.

In this way, the first problem I encountered was how to get started. For existing open-source projects, we need to downloadSource codeYou only need to checkout to a working directory. But now this is a new project. How can I set the client? Alas, it's really simple. Create an empty folder, right-click-> checkout, enter the account and password according to the instructions above Google Code, and initialize a local working directory, drag the project file and you will see the simple overlay icon, indicating unversioned. Now you can start working! (ALT α IR is happy !)

After a while, I am ready to upload the file to the server. Simply, right-click the working directory and choose commit. A list is displayed, showing all unversioned, haha, or start. Select All, OK!

Next, ALT α IR began to regret it, because this initial project fully uploads 10 MB of stuff to the server! Fortunately, Google Code increased its capacity limit to 1 GB a few months ago. Otherwise, it would have taken up 10% of the space at the beginning. What will happen in the future! But no matter whether it works, because the server is saving copies of each version. If it is 10 MB at a time, 100 GB will be used up sooner or later!

After checking one file, it is found that the culprit is one. on the NCB file, this file is estimated to be unique to the C ++ project. VS is used to save the smart prompt information. It is very large. If it is deleted, it will be automatically generated when the project is re-opened, to put it bluntly, there is no need to track changes in this file. Right-click, haha, there is an add to ignore list, you can also choose to ignore a single file or this extension, of course, ignore this extension!

However, where can I manage the ignore list? Open the help check, which can be found in the right-click Properties of the working directory.

Now, you can happy coding again. Alt α IR ignores the right-click SVN menu, rename the folder, change the name of the file, delete the file, and add the file. Doesn't SVN support tracking?

This is the second submission! Although I submitted more than 10 times and finally synchronized my files to the server, it would be a disaster if many people work together!

I thought, why are there still a lot of people using such bad functions ?! No way, so I opened the help again, entered rename, and finally saw the recommended practice! Summary:

Delete

To delete a file, right-click the file and choose SVN to delete it. The file will be deleted on the server when it is submitted next time. If you want to return the file before submission, right-click the parent directory and choose SVN revert.

If you directly use resource manager to delete a version management file, you are prompted to delete the file from the server when submitting the file. However, if you have not submitted the file, using the update operation will make it "dead" and disrupt your working directory. But this is the work of SVN. It thinks that you accidentally deleted this file, so it will help you restore it. If you want to delete a version control file, you must always right-click it and choose SVN to delete it.

To delete a folder, right-click the folder and choose SVN to delete it. In this case, the folder will have an overlay icon that indicates deletion. You can right-click the folder and choose SVN revert to keep it.

If you directly delete a version management folder in resource manager, you will not be able to submit the working directory, use the update operation to "bring it back to life", and then right-click it and choose SVN to delete it.

To delete a file from the server but retain it locally, right-click SHIFT + and select Delete (keep local ).

If you delete something and submit it, and then want to return it, The revert operation will not help you. But if you know which revision the folder has (you can not remember to check the log), use the repository browser, find it, and right-click it-> copy to, which is called rejuvenation.

Rename

To help, folders and files are good. Right-click and choose SVN rename. In fact, it is delete and then add.

If you use the resource manager to change the name of a file and use commit or check modifications, CTRL + Left click to select the "original file" marked as missing and the "new file" marked as unversioned, right click-> repair move, SVN knows that these two files are renamed. Of course, this method cannot be updated before commit, because we have already mentioned it.

This is more troublesome for folders, because after you rename the folder, if you do not submit the folder, the original folder on the server will be there, when others (or yourself) after updating the content in this folder, you will not be able to delete the folder on the server. That is to say, the new and old folders are stored on the server at the same time, and you will be miserable. Remember not to modify the contents of the folder after the folder is renamed. Submit the folder as soon as possible.

That is to say, using tortoisesvn to rename is very troublesome.

Move things

In the working directory, right-click and drag an item in version management. After you put it down somewhere in the working directory, select SVN move. You can also use the repository browser to move the item.

The help also said: Do not SVN move externals. This is not clear. It is estimated that it is moving something between multiple working directories. Do not use this command. Otherwise, it is possible to delete something from others, it's not good to be unhappy with others.

Delete files not tracked

This function can be said to be a by-product of SVN. Since you do not track it, it is possible that you do not need these items. If you want to delete them, right-click SHIFT + and select Delete unversioned items, sometimes it's quite easy.

Summary:

This article records some traps and problems encountered by Altair in its first open-source project using SVN, as well as some solutions. I sorted out these records and hoped to help those who were new to SVN.

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.