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

[RFC] Altering copyfrom information in repository

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Tue, 22 Nov 2011 00:23:03 +0100

Hi all,

I'm wondering if it would be feasible to (make it possible to)
alter/add copyfrom information in an SVN repository. And if so, would
this be a desirable feature?

It would certainly be useful (although I can't fully estimate the
ramifications) for the following use case:

- User commits a move, but for some reason it's lacking copyfrom
information (possible reasons are 'svn mv A B; svn mv B A' with svn <
1.7 [1]; or user performed a non-svn move; ...)

- Work continues, further commits are done on the moved item, ...

- After a while, someone notices the unwanted breakage of history
('svn log' stops at the point of breakage), and they want to repair it
to have again a "complete" line of history.

Currently, the only way I know to repair this, is:

    svn rm thefile
    svn copy $URL/thefile_at_REV-BEFORE-BREAKAGE .
    # replay all the text modifications after the breakage,
    # and commit them one by one
    # or alternatively: replace the text by the latest version,
    # and commit all at once (less nice history (collapsed))

This can be a lot of work (especially if a lot of commits have gone by
since the breakage, or if multiple files (dirs) are involved which
each evolved differently afterwards). Not to mention that it can
become quite ugly if commits are replayed one by one (builds failing
in the meantime, ...).

In this case, it would be very useful if one could simply add the
missing copyfrom information to the repository. I can think of several
possible ways:
- On a live repository (like editing revprops (possibly protected by a hook))
- With an svnadmin command
- By dumpfile manipulation, if nothing else

Thoughts, opinions, ...?

[1] http://subversion.tigris.org/issues/show_bug.cgi?id=3429 - "svn mv
A B; svn mv B A" generates replace without history (fixed in 1.7)
Received on 2011-11-22 00:23:59 CET

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.