[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: Mo DeJong <supermo_at_bayarea.net>
Date: 2001-09-17 20:28:42 CEST

On 17 Sep 2001 09:24:33 -0500
cmpilato@collab.net wrote:

> Mo DeJong <supermo@bayarea.net> writes:
>
> > My second question is related to the "unadd" and "undelete" methods included
> > in the svn client. Why do we need a special unadd method to undo an add?
> > Can't the user just call delete on the file or dir?
>
> Currently, the user can call delete to effectively un-add a file. Do
> I think this is proper? Not particularly.

Thanks for the reply Mike. Could I bother you to elaborate a bit more
on why doing a `svn add foo.c` and then a `svn delete foo.c` to change
your mind before a commit is wrong? Shouldn't the user think of add
and delete as inverse operations? If so, don't the unadd and undelete
operations just function as aliases? I know they are different functions,
I am just trying to look at this from a new user's perspective.

> When I first started using CVS (which was only about 3 years ago),
> there were some things I simply did NOT understand. Why was it that
> when I would "add" a directory, it happened immediately, yet adding
> files required a commit?

Or that adding a file without doing a commit required write access to the
CVS repo, what were they thinking?

> Why was it that I couldn't delete
> directories, with or without a commit? Why was it that obviously the
> files I just added weren't really versioned until I committed, yet
> somehow I could delete them? Delete them from what?!
>
> All that aside though, I have no personal connection with the unadd
> command. If the community wishes to lose it, that's fine with me --
> one less thing to debug. :-) (and there are definitely still bugs
> there -- I never got a chance to debug unadd or undelete)

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"

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

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

I looked around in svn_wc_undelete but it does not look like this is what
it was trying to do. Does this seem like a reasonable use case? Is there
some other way a user could resurrect a directory that had been deleted?
If not, perhaps the undelete subcommand should be retained.

cheers
Mo DeJong

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