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

Re: Remove revisions?

From: Tim Moloney <moloney_at_mrsl.com>
Date: 2002-03-18 19:54:52 CET

Karl Fogel wrote:

> Ben Collins-Sussman <sussman@collab.net> writes:
>
>>>Is it possible to remove the last revision (or last n revisions) from a
>>>repository?
>>>
>>>I don't see anything that describes how to do this with either the svn
>>>or the svnadmin command. I wouldn't expect it in svn but I would think
>>>that svnadmin would have the ability to remove revisions. Conceptually,
>>>it seems easy to do.
>>
>>Read issue #516: "svn obliterate":
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=516
>
> Actually, removing the most recent N revisions is much easier than
> "svn obliterate", because earlier revisions cannot possibly have
> dependencies on later ones. A correct but inefficient approach would
> be simply to delete those rowse from the `revisions' table; nicer
> would be to remove the corresponding stuff from `nodes' and `strings'.
>
> Of course, working copies would be invalid, but detectably so -- at
> least until new revisions using the same numbers are committed.
> <evil grin> :-)

Given the current state, how would I do either of the following?

- Save an older revision to the head.
- Move the last n revisions to a branch.

I suspect that the first is easier but the second would be a better
solution.

I tried checking out the desired version and committing it but svn found
no differences so nothing was committed.

On a semi-related note, the man page says

   -n or --dry-run Don't actually do it, only show what would be
                     done if the given command did run.

but when I try
   bash> svn commit --dry-run
   svn: invalid option: --dry-run
   [...]
   bash> svn commit -n

   Error: subcommand 'commit' doesn't accept option '-n [--nonrecursive]'

   [...]

The man page appears to be out of date or 'svn commit' appears to be
missing the --dry-run option.

-- 
Tim Moloney
ManTech Real-time Systems Laboratory
2015 Cattlemen Road                             \     /
Sarasota, FL  34232                     .________\(O)/________.
(941) 377-6775 x208                        '  '  O(.)O  '  '
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 18 19:56:07 2002

This is an archived mail posted to the Subversion Dev mailing list.