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

Re: Problems dumping a directory tree and then loading into fresh repository

From: James Lamanna <jamesl_at_appliedminds.com>
Date: 2005-08-19 22:08:13 CEST

Joshua Varner wrote:
> On 8/18/05, James Lamanna <jamesl@appliedminds.com> wrote:
>>Not sure if this ever got through...sending again....
>>I have a directory tree that I'm trying to dump from one repository and
>>then load in to a new repository.
>>I've extracted all the pertinent revisions by parsing an svn log of the
>>path, and now I'm running dumps and loads over all the revision ranges.
> . . .
>>Any help?
>>The server version is 1.1.4 (r13838)
> Could you send an exact transcript of the commands you are using?
> This is not enough information to be able diagnose the problem.
> The only thing I can guess is that you are using --incremental, but since
> you are skipping around certain revision numbers, you may have missed
> the revision a file was added in. But that is a WAG.

Looking at the output, I can tell that the file does exist in the
repository already.

I'm using the following python script:

Python script to get revisions for a directory, for passing to svn admin
svn log [url to directory] | python getrevs.py

Output, list of revision ranges on standard out:

Could be sent to dump/admin with the following shell script:


while read rev; do
     svnadmin dump -r $rev --incremental PATH_TO_OLD_REPOS | svnadmin

import sys
import re

# Bad files I don't want to transfer over - all revs here are self
# contained.

exclude_revs = [5396, 5365, 5364, 5231, 5230, 5226]
revs = []
rev_re = re.compile(r'r(\d+)')
for line in sys.stdin:
     if line is None:
     m = rev_re.match(line)
     if m is not None:
         # Found rev
         rev = int(m.group(1))

p_rev = -1
n_rev = -1
for rev in revs:
     if rev in exclude_revs:
     if p_rev == -1:
         p_rev = rev
         n_rev = rev
         if n_rev != rev - 1:
             print '%d:%d' % (p_rev, n_rev)
             p_rev = n_rev = rev
             n_rev = rev
print '%d:%d' % (p_rev, n_rev)

and then sending it to the following shell script:

while read rev; do
     svnadmin dump -r $rev --incremental PATH_TO_OLD_REPOS | svnadmin

James Lamanna
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Aug 19 22:26:32 2005

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.