[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: NASCIMENTO eduardo <eduardo.NASCIMENTO_at_gemalto.com>
Date: Wed, 24 Sep 2008 18:42:46 +0200

Hi Ryan

Thanks a lot! I tested your suggestion and it works pretty fine =) As you guessed I had just used svn mkdir to create a new folder (Test_Projects) and after that I used svn move to get things done. Of course, the merge (using svndumptool) didn't work although I didn't receive any error message. The problem is that I missed the proper way of using svndumptool to move everything from the repository root into a new folder.


Eduardo Borges do Nascimento
Global Services Americas - Business Efficiency trainee
Tel: +55 11 5105 7658
Fax: +55 11 5105 7610
Av. Eng. Luis Carlos Berrini, 1645 - 4o andar
CEP 04571-011 - Brooklin - São Paulo, SP - BRAZIL

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2008c_at_ryandesign.com]
Sent: Wednesday, September 24, 2008 12:42 AM
To: NASCIMENTO eduardo
Cc: users_at_subversion.tigris.org
Subject: Re: Wrong data while merging two repositories

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

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 18:43:43 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.