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

Munging copy history (was: Re: short question about...)

From: William Uther <willu_at_cse.unsw.edu.au>
Date: 2003-04-18 07:42:23 CEST

On Friday, April 18, 2003, at 09:38 AM, Tom Lord wrote:

> Briefly: there isn't a reasonable (easy
> to explain/understand, user controllable, suitably flexible)
> correlation between svn's directory-changing operations and the
> programmer's idea of logical file correspondences.

[snip]

> [What you want is] directory-changing commands [that] can "do the right
> thing" most of the time, while still giving users an easy out when the
> right thing is something different.

I've been using subversion with students. It is their first look at a
version control system.

I often find that they copy using normal cp, remove the old '.svn'
directories and then add things to the repository (rather than using
'svn cp').

At the moment I have two options when this happens:

i) lose the copy history and assume that we'll never have to merge
between the copied (or moved) data.

ii) Add the copy history in later as follows:

export their newly added stuff (call this tree A)
svn rm the newly added stuff (tree A)
svn cp the old stuff (from tree B to tree C)
check out tree C
copy the exported tree A over the checked out tree C
check in tree C.

Now we have what was in tree A back in the same location in the
repository, but with copy history.

I was hoping that some time in the future there would be a way to fix
this case automatically. Some ideas:

i) My original thought was that you could use the merge history
properties somehow, but I'm not sure the merge algorithms being
proposed will work in this case. Does merge history allow you to add
new copy information, or just figure out what has been merged between
copies that previously existed.

ii) You might be able to do something wacky with svndumpfilter that
goes in an adds the appropriate copy history. This is not a
lightweight solution though...

Thoughts,

Will :-}

--
Dr William Uther                            National ICT Australia
Phone: +61 2 9385 6926             School of Computer Science and 
Engineering
Email: willu@cse.unsw.edu.au             University of New South Wales
Jabber: willu@jabber.cse.unsw.edu.au          Sydney, Australia
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 18 07:43:34 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.