You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Justin Erenkrantz <je...@apache.org> on 2002/07/10 17:20:51 UTC

Revert has no implicit dot-target.

subversion/clients/cmdline/revert-cmd.c:51

/* Revert has no implicit dot-target `.', so don't you put that code here! */

Is this *really* what we want?  (I'll prod in the direction that
revert should have an implicit dot-target.)

Even if we don't have an implicit dot-target, should we add a note
in 'svn help revert'?  -- justin

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

Re: Revert has no implicit dot-target.

Posted by mark benedetto king <bk...@inquira.com>.
On Wed, Jul 10, 2002 at 02:32:10PM -0500, cmpilato@collab.net wrote:
> Garrett Rooney <ro...@electricjellyfish.net> writes:
>
> > On Wed, Jul 10, 2002 at 11:29:46AM -0700, Justin Erenkrantz wrote:
> > > On Wed, Jul 10, 2002 at 02:13:17PM -0400, Ben Collins wrote:
> > > > It just seems intuitive (as I've tried the command several times still
> > > > expecting it to work :) that if I say "recursive" and don't pass an arg,
> > > > I mean ".". Obviously, since recursive is not the default, and implicit
> > > > dot-target for that case wouldn't make any sense, nor would it work in a
> > > > logical manner.
> > > >
> > > > Just a thought. I'm not really hung up on it.
> > >
> > > FWIW, I agree with Ben.
> > >
> > > If I say --recursive, I implicitly want '.'.  -- justin
> >
> > i do seem to get caught doing 'svn revert --recursive' and forgetting
> > the . an awful lot, so i'm going to have to agree, the dot should be
> > implicit in the --recursive case.
>
> Oh, I always get caught by it, too.
>
> But <up-arrow><space><period><enter> just isn't that hard to deal
> with. :-)
>

I think any argument that "svn revert" shouldn't have an implicit "."
because, presumably, the user accidentally hit return before specifying
the file name would apply to "svn revert --recursive", too.

What if, instead, we had a novice mode that asked you "Are you sure?",
and an expert mode that didn't?

--ben


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

Re: Revert has no implicit dot-target.

Posted by cm...@collab.net.
Garrett Rooney <ro...@electricjellyfish.net> writes:

> On Wed, Jul 10, 2002 at 11:29:46AM -0700, Justin Erenkrantz wrote:
> > On Wed, Jul 10, 2002 at 02:13:17PM -0400, Ben Collins wrote:
> > > It just seems intuitive (as I've tried the command several times still
> > > expecting it to work :) that if I say "recursive" and don't pass an arg,
> > > I mean ".". Obviously, since recursive is not the default, and implicit
> > > dot-target for that case wouldn't make any sense, nor would it work in a
> > > logical manner.
> > > 
> > > Just a thought. I'm not really hung up on it.
> > 
> > FWIW, I agree with Ben.
> > 
> > If I say --recursive, I implicitly want '.'.  -- justin
> 
> i do seem to get caught doing 'svn revert --recursive' and forgetting
> the . an awful lot, so i'm going to have to agree, the dot should be
> implicit in the --recursive case.

Oh, I always get caught by it, too.

But <up-arrow><space><period><enter> just isn't that hard to deal
with. :-)

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

Re: Revert has no implicit dot-target.

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Wed, Jul 10, 2002 at 11:29:46AM -0700, Justin Erenkrantz wrote:
> On Wed, Jul 10, 2002 at 02:13:17PM -0400, Ben Collins wrote:
> > It just seems intuitive (as I've tried the command several times still
> > expecting it to work :) that if I say "recursive" and don't pass an arg,
> > I mean ".". Obviously, since recursive is not the default, and implicit
> > dot-target for that case wouldn't make any sense, nor would it work in a
> > logical manner.
> > 
> > Just a thought. I'm not really hung up on it.
> 
> FWIW, I agree with Ben.
> 
> If I say --recursive, I implicitly want '.'.  -- justin

i do seem to get caught doing 'svn revert --recursive' and forgetting
the . an awful lot, so i'm going to have to agree, the dot should be
implicit in the --recursive case.

-garrett 

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

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

Re: Revert has no implicit dot-target.

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Jul 10, 2002 at 02:13:17PM -0400, Ben Collins wrote:
> It just seems intuitive (as I've tried the command several times still
> expecting it to work :) that if I say "recursive" and don't pass an arg,
> I mean ".". Obviously, since recursive is not the default, and implicit
> dot-target for that case wouldn't make any sense, nor would it work in a
> logical manner.
> 
> Just a thought. I'm not really hung up on it.

FWIW, I agree with Ben.

If I say --recursive, I implicitly want '.'.  -- justin

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

Re: Revert has no implicit dot-target.

Posted by Ben Collins <bc...@debian.org>.
On Wed, Jul 10, 2002 at 12:46:35PM -0500, cmpilato@collab.net wrote:
> Ben Collins <bc...@debian.org> writes:
> 
> > I would say that doing "svn revert --recursive" should have an implicit
> > dot-target though. "svn revert" should fail as it already does.
> 
> Why compilicate the UI like that for no gain?  Just use the command
> like the usage message says to and be done with it.

It just seems intuitive (as I've tried the command several times still
expecting it to work :) that if I say "recursive" and don't pass an arg,
I mean ".". Obviously, since recursive is not the default, and implicit
dot-target for that case wouldn't make any sense, nor would it work in a
logical manner.

Just a thought. I'm not really hung up on it.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://linux1394.sourceforge.net/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/

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

Re: Revert has no implicit dot-target.

Posted by cm...@collab.net.
Ben Collins <bc...@debian.org> writes:

> I would say that doing "svn revert --recursive" should have an implicit
> dot-target though. "svn revert" should fail as it already does.

Why compilicate the UI like that for no gain?  Just use the command
like the usage message says to and be done with it.

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

Re: Revert has no implicit dot-target.

Posted by Ben Collins <bc...@debian.org>.
On Wed, Jul 10, 2002 at 01:24:59PM -0400, Garrett Rooney wrote:
> On Wed, Jul 10, 2002 at 10:20:51AM -0700, Justin Erenkrantz wrote:
> > subversion/clients/cmdline/revert-cmd.c:51
> > 
> > /* Revert has no implicit dot-target `.', so don't you put that code here! */
> > 
> > Is this *really* what we want?  (I'll prod in the direction that
> > revert should have an implicit dot-target.)
> > 
> > Even if we don't have an implicit dot-target, should we add a note
> > in 'svn help revert'?  -- justin
> 
> i believe the justification is that revert can cause one to lose data,
> so we are protecting a user from their own carelessness by requiring
> them to say exactly what they mean.
> 
> mentioning it in the help output seems like a good idea though.

I would say that doing "svn revert --recursive" should have an implicit
dot-target though. "svn revert" should fail as it already does.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://linux1394.sourceforge.net/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/

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

Re: Revert has no implicit dot-target.

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Jul 10, 2002 at 01:24:59PM -0400, Garrett Rooney wrote:
> i believe the justification is that revert can cause one to lose data,
> so we are protecting a user from their own carelessness by requiring
> them to say exactly what they mean.
> 
> mentioning it in the help output seems like a good idea though.

And, if I were to pay close attention, I would see:

"usage: revert TARGET1 [TARGET2 [TARGET3 ... ]]\n\n"

TARGET1 isn't in brackets.  I still wonder if it would be better
to make this *really* explicit in the help output.  -- justin

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

Re: Revert has no implicit dot-target.

Posted by cm...@collab.net.
Garrett Rooney <ro...@electricjellyfish.net> writes:

> On Wed, Jul 10, 2002 at 10:20:51AM -0700, Justin Erenkrantz wrote:
> > subversion/clients/cmdline/revert-cmd.c:51
> > 
> > /* Revert has no implicit dot-target `.', so don't you put that code here! */
> > 
> > Is this *really* what we want?  (I'll prod in the direction that
> > revert should have an implicit dot-target.)
> > 
> > Even if we don't have an implicit dot-target, should we add a note
> > in 'svn help revert'?  -- justin
> 
> i believe the justification is that revert can cause one to lose data,
> so we are protecting a user from their own carelessness by requiring
> them to say exactly what they mean.
> 
> mentioning it in the help output seems like a good idea though.

+1.  I await your patches. ;-)

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

Re: Revert has no implicit dot-target.

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Wed, Jul 10, 2002 at 10:20:51AM -0700, Justin Erenkrantz wrote:
> subversion/clients/cmdline/revert-cmd.c:51
> 
> /* Revert has no implicit dot-target `.', so don't you put that code here! */
> 
> Is this *really* what we want?  (I'll prod in the direction that
> revert should have an implicit dot-target.)
> 
> Even if we don't have an implicit dot-target, should we add a note
> in 'svn help revert'?  -- justin

i believe the justification is that revert can cause one to lose data,
so we are protecting a user from their own carelessness by requiring
them to say exactly what they mean.

mentioning it in the help output seems like a good idea though.

-garrett 

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

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