SVN: how to update only files modified in a revision

Can I update only files affected by the latest 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.

+6
source share
2 answers

If you like updating specific files, you must provide them on the command line:

svn update file1.txt file2.txt 

If you are not more comfortable, you can write a script to do this.

Update. In the example that you described in your question: you do not need to update the files because they are already updated based on your commitment. Therefore, I think you are thinking of a different working copy.

+11
source

If you want to update the working copy only with the selected commits, you must combine them - you actually create a local branch with the selected cherry commits from the trunk, although the last update should pick them up OK. You will want

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

to find the version number you need, then

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

to combine future 12345 commit into your WC.

Or, if changes are made to disjoint directories, you can simply

 svn update dir-with-changes 

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

+1
source

Source: https://habr.com/ru/post/896198/


All Articles