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

Low level solution to permanently remove revision from repository

From: Thorsten Möller <Thorsten.Moeller_at_unibas.ch>
Date: Mon, 1 Dec 2008 16:16:02 +0100

Hi,

this is not a question but a solution that you may use to permanently remove
(an accidentially committed) revision from a SVN repository. It relates to
this question in the FAQ: http://subversion.tigris.org/faq.html#removal

Use it only at your own risk!

The following conditions need to be satisfied:
1.) The repository is of type 'FSFS'; it does not work with 'BDB'
2.) The revision to remove is the very latest one, i.e., no other commits
were done afterwards.
3.) You have exclusive access to the repository files, i.e., no inferences
with commits can appear while stepping through the actions described below.
4.) Both svnadmin {lslocks,lstxns} do not list any locks nor transactions.

(5.) This description was tested on a SVN 1.4.6 repository. It is not known
if it will work with never versions as well.

The following actions need to be done on the SVN server in order to remove
the last revision _n_:

1.) Go to <MY_REPOS>/db/revprops and delete the file (if any) named _n_
2.) Go to <MY_REPOS>/db/revs and and delete the file named _n_
3.) Edit <MY_REPOS>/current. This file is an ASCII file and should have one
line only. Decrement the number in the first line from _n_ to _n-1_
4.) Done.

Note that all local working copies that were already updated to revision _n_
are currupt afterwards (because the revision _n_ is no longer known to the
SVN server). In my case it was not even possible to switch a local working
copy to revision _n-1_. I had to newly checkout the working copy afterwards.

Best,
Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-12-01 20:39:01 CET

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.