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

Re: The unadd, undelete methods and the client README.

From: Philip Martin <philip_martin_at_ntlworld.com>
Date: 2001-09-17 22:06:13 CEST

Mo DeJong <supermo@bayarea.net> writes:

> I tried to come up with a good reason to include the unadd and undelete
> subcommands. I could not think of anything that could not be done
> using add/delete before doing a commit. One thing about the undelete
> method that did seem interesting was the possibility of using it after
> a commit that removes a directory.
> % mkdir newdir
> % svn add newdir
> % touch foo.c
> % svn add foo.c
> % cd ..
> % svn commit newdir -m "added newdir"

Creates revision number N say.

> % svn delete newdir
> % svn commit -m "deleted newdir"

Creates revision number N+1 say.

> % svn undelete newdir
> % svn commit -m "woops, I did not want to delete newdir"

Since the changes have been committed to the repository, you don't
need a new command to resurrect the directory, you just need the merge
command to support removing deltas as well as adding them. Basically
you tell the merge command to remove the difference between revisions
N and N+1, just as you would for a normal file. That's what version
control is for.

It might be as simple as

$ svn merge --reverse newdir

to reverse the last change. Or more genrally

$ svn merge -r N+1 --reverse newdir


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:41 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.