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

Re: Repository re-organisation / moving files

From: Toby D. Watson <t.d.watson_at_durham.ac.uk>
Date: 2004-11-24 18:24:11 CET

Thanks the David's advice I tried out dumping the repository, altering
the dumpfile and then loading it into a fresh repository.
Unfortuanately, this seems to fail:

[root@mozart svn]# svnadmin load /svn/hs < /tmp/hs-dumpfile
<<< Started new transaction, based on original revision 1
      * adding path : trunk/data ...svn: File not found: transaction
'1', path 'trunk/data'

Now, I presumed that this was because the trunk directory did not exist
so I attempted to add a new directory in the first revision, adding the
creation of "trunk" to the dumpfile. However, I appear to have been
thwarted as this fails:

[root@mozart svn]# svnadmin load /svn/hs < /tmp/hs-dumpfile
<<< Started new transaction, based on original revision 1
      * adding path : trunk ... done.
      * adding path : trunk/data ... done.
      * adding path : trunk/data/datx.dat ...svn: Checksum mismatch, rep
    expected: e2d02b210abba3a8582dc95b7abc1909
      actual: 5a7d0fa08b8f68d6c3dc116f892df400

Would it be possible that anyone could give me some pointers here please?

Many thanks for any assistance,


David Kramer wrote:
> On Mon, 22 Nov 2004, Toby D. Watson wrote:
>>In an earlier post that I dug up it was suggested - if I read it right!
>>- that one solution was to dump the repository then recreate it after
>>"hacking" the dumpfile. Having examined the dump files produced I am a
>>little unclear about what this means.
>>If anyone could put me right on this that would be very helpful.
> I think I was the one to post that.
> What I did was edit the dump files in emacs. For each directory and file,
> there's a section of headers defining the properties. One of the lines
> should say "Node-path:". What I did was do a global search and replace so
> the files and directories were laid out the way I wanted. Then I set up
> the empty repository and loaded the dumpfile into it. All the files were
> laid out in the new arrangement, and I had the full history of each file
> and directory intact.
> Ferinstance, let's say I had
> myproject/bar/branches
> myproject/bar/trunk
> myproject/bar/tags
> myproject/baz/branches
> myproject/baz/trunk
> myproject/baz/tags
> myproject/foo/branches
> myproject/foo/trunk
> myproject/foo/tags
> and I wanted
> mypoject/branches/bar
> mypoject/branches/baz
> mypoject/branches/foo
> mypoject/trunk/bar
> mypoject/trunk/baz
> mypoject/trunk/foo
> mypoject/tags/bar
> mypoject/tags/baz
> mypoject/tags/foo
> I would search and replace
> "Node-path: myproject/bar/branches"->"Node-path: myproject/branches/bar"
> "Node-path: myproject/bar/trunk"->"Node-path: myproject/trunk/bar"
> "Node-path: myproject/bar/tags"->"Node-path: myproject/tags/bar"
> "Node-path: myproject/baz/branches"->"Node-path: myproject/branches/baz"
> "Node-path: myproject/baz/trunk"->"Node-path: myproject/trunk/baz"
> "Node-path: myproject/baz/tags"->"Node-path: myproject/tags/baz"
> "Node-path: myproject/foo/branches"->"Node-path: myproject/branches/foo"
> "Node-path: myproject/foo/trunk"->"Node-path: myproject/trunk/foo"
> "Node-path: myproject/foo/tags"->"Node-path: myproject/tags/foo"
> You could use sed, perl, an editor, or whatever you're comfortable with,
> to do the search and replace.
> Just don't forget to include the "Node-path: " part in your search and
> replace to guarantee you don't change any text in your source files.
> ----------------------------------------------------------------------------
> DDDD David Kramer david_at_thekramers.net http://thekramers.net
> DK KD Some people have told me they don't think a fat penguin really
> DKK D embodies the grace of Linux, which just tells me they have never seen
> DK KD an angry penguin charging at them in excess of 100mph. They'd be a
> DDDD lot more careful about what they say if they had. Linus Torvalds

Toby Watson
Department of Economics and Finance
University of Durham
23-26 Old Elvet
Durham DH1 3HY
Direct Tel:  +44(0) 191 334 6338
Office Fax: +44(0) 191 334 6341
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 24 18:27:13 2004

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.