I am completely new to svn (and RCS for softw开发者_开发知识库are projects).
The situation I am trying to deal with may be very basic!
There is this project code that I am interested in developing. So every time there is a new version, I do a svn checkout and get the latest code.
But, I want to make a few code changes to each checkout so that the code works for my m/c (which is in a non-default configuration with regards to the project).
Assuming that I won't be checking back my changes into the project, what is the best way to put in my changes every time I check out the project files?
After gaining familiarity with the project, I would like to start making changes which I want to check into the project. Would I be able to check in only the changes that I want? (I don't want to checkin all the changes that I made to allow the project to compile on my m/c).
thanks.
PS: found answer to 2nd question here: How do I avoid checking in local changes to the SVN repository?
This is where DVCSes come into play and do their job nicely. More specifically, you can use Mercurial and pull changes from third-party SVN repo to your local repository, which will contain your local changes.
Assuming that your local changes do not conflict with remote changes, you probably do not want to make a new checkout to get latest version of project but do an update instead. This will bring in the remote changes. Even if you have edited a file that has changed remotely, merging won't be an issue unless changes overlap in which case there will be a conflict.
When you want to start commiting your changes, you will be able to decide which files you'll be putting in. Depending on the tool, this can be nice or not-so. For instance, IntelliJ IDEA has pretty nice feature set for handling partial commits (you can build change sets, shelve changes etc). OTOH, SVN's basic command line is not particularly nice for manually building change sets. But in general, yes, you will be able to decide which files your commit consists of.
精彩评论