You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Tim Moloney <mo...@mrsl.com> on 2002/03/18 17:26:23 UTC

Remove revisions?

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.

-- 
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

Re: Remove revisions?

Posted by Tim Moloney <mo...@mrsl.com>.
Karl Fogel wrote:


> Ben Collins-Sussman <su...@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

Re: Remove revisions?

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Ben Collins-Sussman <su...@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> :-)

-K

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

Re: Remove revisions?

Posted by Ben Collins-Sussman <su...@collab.net>.
Tim Moloney <mo...@mrsl.com> 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


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