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

Re: Is it possible to delete last revision?

From: Patrick Smears <patrick.smears_at_ensoft.co.uk>
Date: 2004-12-10 00:15:23 CET

On Thu, 9 Dec 2004, Zia Syed wrote:

> Hi,
> I'm new to subversion and would like to know if it is possible to delete
> the last revision from the repository? I've mistakenly commited some
> code with known problems (my stupidity) in the repository, and would
> like to delete it now just to keep the repository clean with last stable
> version. If its not possible then I guess I will have to make another
> revision.

You can't delete a revision, but what you can do (if nobody has committed
since) is to perform a dump of the repository (look at the documentation
for 'svnadmin dump'), specifying only the revisions that you want (ie if
you've just mistakenly committed r6, you'd dump r1-5, "-r 1:5"), and then
delete/restore the repository from that dump - that will effectively
remove the last revision. (But be careful, and preferably back up your
repository before doing this!)

> Also, is it possible to write comments to revisions after commit?

Yes, use "svn propedit --revprop -r <REVNUM> svn:log". But by default this
is not permitted - you'll need to set up a pre-revprop-change hook. That's
much easier to do than it sounds: go into the directory <repos>/hooks, and
rename the file "pre-revprop-change.tmpl" to "pre-revprop-change", and
ensure it's executable. [ I'm assuming you're running Linux/other Unix
here, if you're running Windows the procedure will be different... ]


The easy way to type accents in Windows: http://www.frkeys.com/
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 10 04:00:19 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.