You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Thorsten Möller <Th...@unibas.ch> on 2008/12/01 15:16:02 UTC

Low level solution to permanently remove revision from repository

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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org