You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andrew Arnott <an...@gmail.com> on 2004/10/16 15:39:13 UTC

Reverse LAST commit

Greetings,

First of all, let me butter you up by saying that Subversion is GREAT.
 I am a convert from Microsoft SourceSafe, and Subversion has improved
even my programming practices with its atomic commits, branching and
renaming tracking, etc. Great job everyone!

I just joined the mailing list, so forgive me if this issue has come
up many times.  I checked the list archive and didn't see this exact
issue though:  Sometimes I do a
svn commit
and as the list is going by of files added, I realize that I added 8MB
of files that I didn't want in the repository.  Sure, there's always a
reverse merge that would remove the files, but meanwhile 8MB was just
added to a repository.  My repository is currently around 300MB, and I
know that's probably small relatively speaking, but I have this fear
of all those multi-megabyte mistakes piling up and giving me a huge
repository for nothing.  Is there a way to hack the repository, at
least to reverse just the very last commit made?

If not, what do you more experienced users of Subversion do in cases
like this?  What about ten years down the road when your repository is
multi-GB?  Do you just live with it?  Export and start a new one?

Thanks,
-- 
Andrew Arnott
Web Developer
Brigham Young University

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Reverse LAST commit

Posted by Chip Turner <ct...@redhat.com>.
Andrew Arnott <an...@gmail.com> writes:

> issue though:  Sometimes I do a
> svn commit
> and as the list is going by of files added, I realize that I added 8MB
> of files that I didn't want in the repository.  Sure, there's always a
> reverse merge that would remove the files, but meanwhile 8MB was just
> added to a repository.  My repository is currently around 300MB, and I
> know that's probably small relatively speaking, but I have this fear
> of all those multi-megabyte mistakes piling up and giving me a huge
> repository for nothing.  Is there a way to hack the repository, at
> least to reverse just the very last commit made?
>
> If not, what do you more experienced users of Subversion do in cases
> like this?  What about ten years down the road when your repository is
> multi-GB?  Do you just live with it?  Export and start a new one?

You can use 'svnadmin dump -rSTART:FINISH' to dump ranges of
revisions.  Do that up to the previous commit and you're good.

Or, you can do a full 'svnadmin dump' and use svndumpfilter in
--exclude mode to exclude the files that you don't want.  This is more
applicable if your ginormous 8mb file was part of a commit where you
wanted the rest of the commit.

Chip

-- 
Chip Turner                   cturner@redhat.com
                              Red Hat, Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org