If you are using SVN clients like TortoiseSVN, in a normal merge the mergeinfo
will be updated as a folder property of the root folder automatically and it will list the folder with a property change during the commit listing of files.
If this is not coming automatically for your commit, then you can even do this even manually by following steps if you are using TortoiseSVN client (with the assumption root
as parent, mytask
as current task branch, subtask
as an already merged back branch from current branch and programs
as your code folder in each brach):
- Right click the
programs
folder on your workign copy of the branch mytask
and select the option TortoiseSVN-->Properties
.
In the new window if you already have previous mergeinfo
recorded then it will list the property svn:mergeinfo
with the values similar to the values below:
root/programs:1-489
root/task/mytask/task/subtask/programs:380-410
Then you can do the following steps:
a) Select the option Edit-->Advanced in the window by selecting svn:mergeinfo item and update the mergeinfo you want to commit click 'OK'.
In the new window, if you don't have any previous mergeinfo
, then you can go for following steps:
a) Select the option New-->Advanced
.
b) Select svn:mergeinfo
from the dropdown list, add appropriate mergeinfo
in the value textbox and save the same.
- Do SVN Commmit by clicking the
programs
folder and it will list programs
folder in files to commit with only property change and you can commit it.
On the otherhand
If you want to commit only the merged files during your merge from the parent to the working copy and keep the locally modified other files uncommitted, then, there is no direct way to achieve this. The indirect way is to keep two seperate working copies (let us say copy1 and copy2) of your task branch (mytask
) and perform the following steps:
copy1
is having all the local changes and you can keep that aside for a while
- SVN checkout a new working copy
copy2
of your branch.
- Merge the changes from your parent to
copy2
and commit that. This ensures that you are commiting only the merged changes to the server with all the mergeinfo
you want.
- Then go to your
copy1
, do an SVN update and it will get the new merged changes from server to this working copy. (If there are some files which are updated during merge and changed by you during local changes as well, then it will conflict during this SVN update). Resolve the conflicts and you can continue with your local changes then.