Tags

,

We need to merge the changes associated with a single directory from trunk to a branch.

Now, this would be super easy except that the commits associated with that directory have modified files elsewhere in the repository and we would like to bring those changes into our branch as well.

What we need is a list of revision numbers associated with the changes to the single directory. Then we can merge those revisions over the entire source tree.

Here’s a command to get the list of revisions in a form that can be easily digested by “svn merge”.

svn log -q ${DIRNAME} | grep ^r | sed 's/^r\([0-9]*\) .*$/\1/' | xargs -Irev echo "-r rev" | tr "\\n" " "
Advertisements