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

Re: Deleting a revision

From: Bryan Donlan <bdonlan_at_gmail.com>
Date: 2004-10-06 00:40:58 CEST

On Tue, 5 Oct 2004 23:31:32 +0100, Glen Barnes <barnaclebarnes@mac.com> wrote:
> Hi,
>
> I know this isn't something that you _should_ do under normal
> circumstances but I need to know how to delete the history of a file up
> until a certain revision. What happened was that I committed a settings
> file that some login details under a username/password field. I updated
> the file in revision 3 to use a generic username/password for when I
> distribute the application. However before I think about opening up the
> subversion repository for others to browse I'd like to delete the old
> references if I could.
>
> Of course I could change the passwords , etc but I would also like to
> delete the history from the repository.
>
> Is there anyway to do this (easy _or_ hard)?

You can delete all history before some revision by dumping that repo
from that revision on, then loading it into a new one:
svnadmin dump -r 3:HEAD oldrepo > dumpfile
svnadmin create newrepo
svnadmin load newrepo < dumpfile

All the revision numbers will be shifted down by two (e.g. r5 becomes
r3), and revisions before 3 will be inaccessible.

-- 
bd
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 6 00:41:20 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.