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

Re: Confusing syntax

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-08-14 21:41:55 CEST

Scott Lamb <slamb@slamb.org> writes:
> I was just confused by a couple syntax things:
> vs.
> Why are these opposite?

This I think is just bad planning. There may be some deeper reason,
but I can't think of it off the top of my head.

> 2. svn diff -r100:101
> vs.
> cvs diff -r1.100 -r1.101
> I think svn's syntax makes sense, but the behavior when the cvs one
> is typed is confusing. It should (A) accept either one or (B) error
> out when an additional -r argument is encountered.

I think we should at least error when encountering syntax (B), and
probably suggest the other syntax. (Care to patch? :-) )

As to why we didn't use the CVS syntax... Greg Stein (sitting next to
me) remembered why: it has to do with the fact that our options can
appear anywhere in the command line, perhaps interspersed with
arguments. So if someone types

   svn diff -r 100 foo.c -r 101 bar.c

they might think they're asking for rev 100 of foo.c diffed against
rev 101 of bar.c, when they're really going to get the 100:101 diff of
*both* files.

Since it's hard to keep the meaning intuitively clear, we opted for
the tightly bound "-rREV1:REV2" syntax, which makes it clear that
you're getting a certain revision *range*, perhaps mapped across
multiple targets.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 14 21:59:03 2002

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.