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

Re: Revisions with wrong chronologic order

From: Ori Avtalion <oavtal_at_bezeqint.net>
Date: 2007-04-11 00:13:53 CEST

Nathan Kidd wrote:
> Jared Silva wrote:
>> Oefelein, Martina wrote:
>>> I think that's hard to do in a situation like Ori's where you have
>>> two repositories with 2 years commit history that you want to combine
>>> into one. You would have to dump each revision individually, and then
>>> load the dump files in date order.
>>
>> Yes, it may be tedious. However, if this is what he wants, this is
>> what he needs to do.
>>
>> Shame there is not a script to take care of this...
>
> Actually, this would be very simple to write a script for.
>
> for (each repository)
> for (each revision)
> dump > dumpdir/{revisiondate}-{revisionnumber}-{reponame}.dump
> done
> done
>
> for (alphabetically sorted list of files in dumpdir)
> load < {file}
> done

I have tried this. Didn't work quite well.

My procedure (which was only pseudo-automated - no script. sorry):
* Dump all revisions into seperate files using the command "svnadmin
dump -r # --incremental" - I got some warnings that some revisions were
of an earlier date than the first revision, and they cannot be imported
into an empty repos - that makes sense.
* Produce a list of revisions using "svn log | grep "^r.*|"
* Sort the list of revisions with the timestamp as the first field and
the revision as the second (There are cases where two timestamps are the
same since I used the vss2svn tool).

* Now I created a new repository and executed "svnadmin load" for each
revision in the sorted order.

The resulting repository had less revisions than the original and had
missing revisions.

During the conversion, I noticed that not every "svnadmin load" command
produced a commit. Some just printed something like "started new
transaction from old revision..." and only after one or two more "load"s
came the commit message.

Why should that happen, and how can I avoid it?

I'm using svnadmin v1.3.1

-Ori

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 11 00:14:30 2007

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