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

Re: Remove revision range from repository

From: Nico Kadel-Garcia <nkadel_at_gmail.com>
Date: Thu, 5 Dec 2019 08:05:35 -0500

On Thu, Dec 5, 2019 at 5:00 AM Josef Wolf <jw_at_raven.inka.de> wrote:
>
> Hello,
>
> I need to permanently remove a range of revisions from a repository, which are
> not the latest.
>
> None of the working copies have such a revision checked out (I guess, that
> might be a show-stopper).

I'd urge you to to lock the old repository, build a new subversion
repository using "svnadmin dump", "svndumpfilter", and "svnadmin
load". Then switch your users to the new repository. Thatwill make
clear to your clients that are, in fact, using a different repository
with a different history and avoid confusion. Subversion is *very
picky* about deleting history, and there are philosophical and
security reasons to hinder the alteration of history as you are
looking for.

It sounds like you really want the "obliterate" feature to delete
accidentally committed sensitive files, which has never been
successfully done.

> I know, I can do:
>
> # svnadmin dump /original/repo -r0:1234 > /path/to/dumpfile_1.dmp
> # svnadmin dump /original/repo -r2345:HEAD --incremental > /path/to/dumpfile_2.dmp
> # svnadmin create /new/repo
> # svnadmin load /new/repo < /path/to/dumpfile_1.dmp
> # svnadmin load /new/repo < /path/to/dumpfile_2.dmp
>
> But that would renumber the revisions of the second load command.

Why are you using "--incremental" ?

> Is there any way to insert empty revisions, so that the revision numbers would
> be stable?
>
> BTW: I guess, I'd need to set the uuid to the uuid of the old repository if I
> don'w want existing working copies to get into trouble?

The way you fix this is to *not use any* existing working copies. Make
people check out a new copy with the new uuid. You have zero control
over whether a working copy has those deleted revisisions.

I went through this with a bad commit in a source tree for a stock
exchange, and the cleanup when I failed to switch repos wasn't pretty.
Received on 2019-12-05 14:06:02 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.