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
dump/load.
Usage:
svn log [url to directory] | python getrevs.py
Output, list of revision ranges on standard out:
rXXXX:rXXXX
Could be sent to dump/admin with the following shell script:
#!/bin/sh
while read rev; do
svnadmin dump -r $rev --incremental PATH_TO_OLD_REPOS | svnadmin
load PATH_TO_NEW_REPOS
"""
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:
break
m = rev_re.match(line)
if m is not None:
# Found rev
rev = int(m.group(1))
revs.append(rev)
p_rev = -1
n_rev = -1
revs.reverse()
for rev in revs:
if rev in exclude_revs:
continue
if p_rev == -1:
p_rev = rev
n_rev = rev
else:
if n_rev != rev - 1:
print '%d:%d' % (p_rev, n_rev)
p_rev = n_rev = rev
else:
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
load PATH_TO_NEW_REPOS
--
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