[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Wrong data while merging two repositories

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Tue, 23 Sep 2008 22:42:17 -0500

On Sep 23, 2008, at 6:07 PM, NASCIMENTO eduardo wrote:

> I’m using svndumptool to merge two repositories. The problem is
> that in Repository A I have projects with the same name as in
> Repository B. Let’s say:
>
> Repository A:
>
> /Project_A
> /Project_B
>
> Repository B:
>
> /Project_A
> /Project_B
>
> After changing repository A to
>
> Repository A:
>
> Test_Projects/
> /Project_A
> /Project_B
>
> I merge the two repositories. At first the merge runs OK but it
> doesn’t properly loads (I got an incomplete repository). What
> should I do? Is there any way of solving interactively conflicts
> during the merge phase?

"svndumptool merge" is not the same thing as "svn merge". "svn merge"
merges a revision or range of revisions from a repository path into a
working copy; "svndumptool merge" merges multiple dumpfiles together,
interleaving their revisions to keep them in chronological order.
There is no such thing as a conflict with regard to what svndumptool
is doing.

How did you change repository A so that everything is under
Test_Projects? If you just used "svn mkdir" to create the
Test_Projects directory and then used "svn mv" to put Project_A and
Project_B into it, then that won't help anything; Project_A and
Project_B are still at the root of the repository in every revision
before then.

Probably what you should do is use the rename option of "svndumptool
merge".

See this example from the svndumptool README:

Moving things around
--------------------

The merge command has a rename option so merge can be 'abused' to just
rename parts of a repository.

The following example shows how to add trunk tags and branches and move
everything in from the rpository root into trunk:

svndumptool.py merge -i source.svndmp -r "" trunk \
        -d trunk -d tags -d branches -m "Create trunk tags and branches." \
        -o destination.svndmp

(From http://svn.borg.ch/svndumptool/0.5.0/README.txt)

So you may want (warning: untested):

svndumptool.py merge \
-i repoA.dump \
-r "" Test_Projects \
-d Test_Projects \
-i repoB.dump \
-o combined.dump

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-24 05:42:45 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.