RE: [PATCH] destroy_repository.py and empty/non-empty revisions
Jon Foster <[email protected]> Fri, 5 Mar 2010 12:12:36 -0000
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Michael Haggerty wrote: > Jon Foster wrote: > > The attached patch to contrib/destroy_repository.py makes it > > preserve the empty/non-empty state, while still destroying the > > actual data. The patch is against cvs2svn trunk. > > Also a good idea. Thanks for the patch! > > I went a step further and set the revision texts to say something > about the revision number of the corresponding revision. I think > this text might sometimes be helpful for debugging. Clever. And I agree. > The main functional difference to your patch is that your patch > leaves an empty HEAD revision empty, whereas my patch changes > it unconditionally to "This text was last seen in HEAD (revision > REV)". Would that be a problem for your purposes? I don't think it'll be a problem. If I need a test case with an empty HEAD revision, I can manually edit the ,v file after using destroy_repository.py. (When destroy_repository has finished, the ,v file is text-only and small enough to be edited easily). And my usecase is unusual; for 99.9% of users, it's better to have the revision texts tell you the revision number. One minor nit I noticed when reviewing this patch: when calling the next Sink in the chain, DestroyerFilterSink uses a mix of FilterSink.somemethod(self, ...) and self.sink.somemethod(...). These are equivalent, but it might be better to just use one style or the other. (I prefer the FilterSink.somemethod() style superclass calls, because they make it obvious that DestroyerFilterSink does everything FilterSink does. But it doesn't really matter). Thanks for the review & improvements! Kind regards, Jon ********************************************************************** This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd. If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Cabot Communications Limited Verona House, Filwood Road, Bristol BS16 3RY, UK +44 (0) 1179584232 Co. Registered in England number 02817269 Please contact the sender if you believe you have received this email in error. ********************************************************************** ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2455400 To unsubscribe from this discussion, e-mail: [[email protected]].