Francois B. wrote:
For that, you need to merge the changes from the remote repository.
Something like that:
svn merge -r1234:HEAD http://plugin.com/svn/plugin-name/trunk
vendor/plugins/plugin-name
svn commit -m “Merged changes 1234:4567 from
http://plugin.com/svn/plugin-name/trunk”
You may want to use the explicit revision in the merge command instead
of HEAD
in case there’s a revision that is committed to the source repository
while this
is working. If that does happen, then the commit message is out of
date. It’s
a little anal, but it reduces one more than that can go wrong.
Another point, that if the external repository adds a new file into
their
repository, the merge will fail due to a limitation of the Subversion
client.
There is an open ticket for it, but it’s not resolved yet.
So if you were doing merge tracking like this against Ruby on Rails
stable
branch, which I was doing, that was getting a lot of new files being
added, I
was stuck. I ended up doing something like this:
$ svn diff
-r1234:2345
http://plugin.com/svn/plugin-name/trunk
vendor/plugins/plugin-name \
patch
$ patch -p0 < patch
Finally, I then ‘svn add’ and ‘svn rm’ any files that shouldn’t be in my
repository, by comparing my working copy with another working copy
checked out
from http://plugin.com/svn/plugin-name/trunk.
Subversion does not yet have merge tracking. Once it has that, it
will be easy to merge multiple times from a remote repository. Until
then, you have to remember which revision you last merged from.
Subversion to the rescue again:
svn merge -r1234:HEAD http://plugin.com/svn/plugin-name/trunk
vendor/plugins/plugin-name
svn propset last-merged-revision 4567 vendor/plugins/plugin-name
svn commit -m "Merged changes 1234:4567 from
You can use the Python svnmerge.py script from
http://svn.collab.net/repos/svn/trunk/contrib/client-side/svnmerge.py
http://svn.collab.net/repos/svn/trunk/contrib/client-side/svnmerge.README
to keep track of merged revisions. This script adds a
svn-merge-integrated
property into the top level directory which receives the merges and this
stores
which revisions have been merged over. So the next time you run
svnmerge.py,
you only get the revisions you haven’t previously merged over.
Regards,
Blair
–
Blair Z., Ph.D.
[email protected]
Subversion and Orca training and consulting
http://www.orcaware.com/svn/