[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-22 22:44:29 CET

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.

Thanks David - that is a clear explanation.

I have 264 occurrences of Node-path in my dump file so I guess I can run
through the file with something and alter them. In my case, since I have
everything in the top-level directory with a few subdirectories for
things like data (pretty much static) and misc I would change all
"Node-path: " to "Node-path: trunk/", which should hopefully(!) work.

However, if I choose not to include data & misc etc. in the trunk then
it becomes more complicated, so I may be best just including them.

I was also curious as to why it was you decided to change from - what I
perceive as standard - layout of:

project1 /trunk
        /branches
        /tags

project2 /trunk
        /branches
        /tags

to having what I guess are global branches, tags and trunk. The interest
in this is to saving me having to do yet another reorganisation further
down the road!

Many thanks,

Toby.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Nov 22 22:47:14 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.