[darcs-users] Re: patch numbers and annotate and diff etc.

Michael G Schwern schwern at pobox.com
Sun Apr 3 03:46:08 UTC 2005


On Sun, Apr 03, 2005 at 02:44:59AM +0000, Mark Stosberg wrote:
> I heard that SVN has an obliterate function, which means perhaps they
> can have a similar situation when revision "2" may have been
> obliterated. (But I haven't researched how that works in SVN..just
> guessing). 

AFAIK SVN does not have an obliterate function, but people have been
clamoring for one.
http://subversion.tigris.org/issues/show_bug.cgi?id=516

The way I've seen it cobbled together, and I have done this myself [1], is 
this.  Let's say you have a repository with revisions from 1 to 100.  You
want to completely obliterate from history revision 89.  It never happened.

1. Make a dump of the repository from 1 to 88.
	svnadmin dump old/repo -r1:88 > lower.dump
2. Load that into a new repository
	svnadmin load new/repo < lower.dump
3. Make a trivial change to the new repo explaining that #89 was
   obliterated.  This becomes the new #89 filling the hole so that revision 
   numbering is preserved.
4. Make a dump of the repo from 90 to the end.
	svnadmin dump old/repo -r90:HEAD > upper.dump
5. Load that into the new repository
	svnadmin load new/repo < upper.dump
6. Copy the new repository over the old.

This is, of course, invasive and (I think) requires everyone to re-checkout
a fresh copy of the repository.

This is the hackish way to do it.  I don't know how "svn obliterate" would
actually be implemented inside of SVN.


[1] My case was where I was trying to make a tag (which is just a copy of
the repo) and accidentally copied a tag inside a tag and then did it again.
So I deleted the tag directory (with svn delete) and started over again.
Problem was when I pulled the changes with SVK, SVK would dutifully
perform all the copying done on the mistaken changes and then dutifully
delete them all.  A performance bug in SVN and/or SVK at the time conflated
the problem making getting a fresh copy of the repository take forever.
So I obliterated the changes in question.





More information about the darcs-users mailing list