[Svnmerge] Merging for foriegn repositories

Blair Zajac blair at orcaware.com
Thu Nov 17 16:08:52 PST 2005


I'm finding a need to track a foreign svn repository and want to merge commits 
from that repository to my repository.

In this case, I've got a private copy of the Ruby on Rails repository at 
http://dev.rubyonrails.org/svn/rails/trunk checked into my /vendor/trunk.  What 
I want to do is anytime they tag a new release, I want to merge from their trunk 
any unmerged revisions up to the revision that was used for the tag.  And when 
they introduce key bug fixes, rather than waiting for a new release, I want to 
merge in only those several commits.

I would love to use svnmerge for this, but trying to do this doesn't work, as 
when you type

$ svnmerge init -s -v -r 1-2926 http://dev.rubyonrails.org/svn/rails/trunk
...
Password for 'blair': svnmerge: checking latest revision of 
http://dev.rubyonrails.org/svn/rails/trunk
svnmerge: latest revision of http://dev.rubyonrails.org/svn/rails/trunk is 3078
svnmerge: checking status of "."
svnmerge: marking . as already containing revisions 1-2926 of 
http://dev.rubyonrails.org/svn/rails/trunk.
svn propset -q svnmerge-integrated /trunk:1-2926 .

Then you end up with '/trunk:1-2926' in your svnmerge-integrated.

I'm aware that you can access the same repository from multiple URLs, so I think 
the solution to this is to get the repository UUID and prepend it to the 
svnmerge-integrated for each path.  This way, it doesn't matter how the 
repository is accessed.

$ svn info http://dev.rubyonrails.org/svn/rails/trunk | grep UUID
Repository UUID: 5ecf4fe2-1ee6-0310-87b1-e25e094e27de

I think the current svnmerge-integrated property can continue to stand as is, 
but if there's a integrated property formated as

5ecf4fe2-1ee6-0310-87b1-e25e094e27de:/trunk:1-2926

then svnmerge looks into a new 'svnmerge-foreign-repos' property for a table 
that links the UUID to the root of the foreign svn repository:

5ecf4fe2-1ee6-0310-87b1-e25e094e27de:http://dev.rubyonrails.org/svn/rails/

The new 'svnmerge-foreign-repos' property is created when 'svnmerge init' is run 
with a foriegn URL.

Comments?

Regards,
Blair

-- 
Blair Zajac, Ph.D.
<blair at orcaware.com>
Subversion and Orca training and consulting
http://www.orcaware.com/svn/



More information about the Svnmerge mailing list