问题
I'm in the following scenario in my application's repository:
- revision 7 (2 changed files, 1 added file)
- revision 6 (4 changed files)
- revision 5 (2 added, 2 deleted, 2 changed)
- revision 4 (3 changed files)
- revision 3 (12 added, 2 changed files)
I want to get a working copy that includes all changes from revision 3 to Head but does NOT include the changes for revisions 5 and 6.
I am using SVN merge for this, but changes are not being reflected, and I'm getting file conflicts for revision 5 and 6.
Below is the config file description of nant that contains executable commands for this.
<exec program="C:\Program Files\CollabNet\Subversion Client\svn.exe" commandline="checkout https://test.repositoryhosting.com/svn/1_test@${Rev} D:\MyTest --username test --password 123"/>
<exec program="C:\Program Files\CollabNet\Subversion Client\svn.exe" commandline="merge -c -6 https://test.repositoryhosting.com/svn/1_test D:\MyTest --username test --password 123" />
<exec program="C:\Program Files\CollabNet\Subversion Client\svn.exe" commandline="merge –c -5 https://test.repositoryhosting.com/svn/1_test D:\MyTest --username test --password 123" />
<exec program="D:\NANT_SCRIPTS\Delete Publish.bat" commandline="${Rev}" />
<exec program="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe" commandline="-nologo -v / -p D:\ MyTest -u D:\PublishOutput_${Rev}" />
How can I solve this issue?
回答1:
You can try to do this the other way around:
- revert the changes of revision 6
- commit
- revert the changes of revision 5
- commit
- check out the Head revision
This should bring the working copy to the state you'd like. The changes of revision 5 and 6 will be reverted in the repository, but this will anyway happen when you commit your changes.
来源:https://stackoverflow.com/questions/12513169/how-to-get-partial-update-from-subversion