开发者

SVN: How to update only the files that were modifed in the revision

Is it possible to update only the f开发者_如何学运维iles that were affected by the last commit? In one command preferably, on linux.

EDIT:

Example. First i commit files 1 and 2. Then i commit files 3 and 4. Now i want to update only files 3 and 4 without updating 1 and 2.


If you like to update particular files you have to give them on command line:

svn update file1.txt file2.txt 

If you wan't it more handy you can write a script to do this..

Update:In the example what you described in your question: you don't need to update the files, cause they are already update based on the commit you did before. So i think you are thinking of a different working copy.


If you want to update your working copy with only selected commits, you have to merge them in - you're effectively creating a local branch with cherry-picked commits from trunk, although the final update should pick them up OK. You'll want

svn log -l 1 http://remote-repository-url/

to find the revision number you want, then

svn merge -c 12345 http://remote-repository-url/

to merge future commit 12345 into your WC.

Or, if changes are committed in disjoint directories, you can simply

svn update dir-with-changes

to split the revision of your WC and pick up only changes in the named directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜