You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@newton.ch.collab.net> on 2002/08/14 19:41:55 UTC

Re: Confusing syntax

Scott Lamb <sl...@slamb.org> writes:
> I was just confused by a couple syntax things:
> 
> 1. svnadmin SUBCOMMAND REPOS_PATH
>    vs.
>    svnlook REPOS_PATH [COMMAND]
> 
>    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.

-K

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

Re: changing svnlook / svnadmin (was: Confusing syntax)

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2002-08-15 at 00:16, Greg Stein wrote:
> Here are svnadmin commands that I think don't need to be imp'd in C, and
> which we could shift off to some Python code:

+0 on all of those.


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

Re: changing svnlook / svnadmin (was: Confusing syntax)

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Aug 14, 2002 at 11:20:23PM -0400, Greg Hudson wrote:
> On Wed, 2002-08-14 at 20:21, Greg Stein wrote:
> > At lunch, I was talking with the guys, and suggested that we might want to
> > replace svnadmin with a Python script. Maybe svnlook, too. Those two
> > programs only run on the machine where the repository is located. It might
> > be reasonable to say that Python is required for the administrators. (we
> > would *never* want to do that for users, tho)
> 
> -1 on this.  Close to -1 even if only Python were required, and not
> SWIG.  There's just no reason to introduce this dependency.

hehe... All righty. I was kinda thinking it might not be advisable for
something as simple as 'svnadmin create' to require Python+SWIG :-)

> > Maybe we can just say that some of the more esoteric svnadmin/svnlook
> > features are removed in favor of some Python-based tools. (e.g. the "shell"
> > subcommand in svnadmin)
> 
> That would be okay, as long as "esoteric" doesn't start to include stuff
> you can't do any other way.

Here are svnadmin commands that I think don't need to be imp'd in C, and
which we could shift off to some Python code:

* createtxn: this just isn't needed for repos admin. it is in there for
  testing purposes, if I understand its heritage correctly. nuke it.
  [well, "nuke" means toss from C and into a Python (example) script]

* lscr: move to svnlook. possibly nuke; I'm not sure of its use case.

* lsrevs: move to svnlook or nuke. printing trees doesn't seem interesting.

* shell: definitely nuke.

* youngest: move to svnlook.


svnadmin would keep: create, dump, load, lstxns, rmtxns, setlog, undeltify


For svnlook, the only thing that I'd toss would be the "ids" command.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: changing svnlook / svnadmin (was: Confusing syntax)

Posted by Greg Hudson <gh...@MIT.EDU>.
On Wed, 2002-08-14 at 20:21, Greg Stein wrote:
> At lunch, I was talking with the guys, and suggested that we might want to
> replace svnadmin with a Python script. Maybe svnlook, too. Those two
> programs only run on the machine where the repository is located. It might
> be reasonable to say that Python is required for the administrators. (we
> would *never* want to do that for users, tho)

-1 on this.  Close to -1 even if only Python were required, and not
SWIG.  There's just no reason to introduce this dependency.

> Maybe we can just say that some of the more esoteric svnadmin/svnlook
> features are removed in favor of some Python-based tools. (e.g. the "shell"
> subcommand in svnadmin)

That would be okay, as long as "esoteric" doesn't start to include stuff
you can't do any other way.


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

Re: changing svnlook / svnadmin

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Aug 14, 2002 at 07:52:41PM -0700, Blair Zajac wrote:
>...
> > > > On Wed, Aug 14, 2002 at 05:21:41PM -0700, Greg Stein wrote:
> > > > > At lunch, I was talking with the guys, and suggested that we might want to
> > > > > replace svnadmin with a Python script. Maybe svnlook, too. Those two
> > > > > programs only run on the machine where the repository is located. It might
> > > > > be reasonable to say that Python is required for the administrators. (we
> > > > > would *never* want to do that for users, tho)
>...
> Agreed.  An we already have the tools in C.  If we didn't have them
> at all, then I could see writing them in Python.

I think we'd want to do it to reduce the long-term maintenance burden.
Maintaining Python is way easier than C code.

> There's enough work to do on Svn without inventing any more :)

hehe. Oh, it would be one of those late-night hack sessions. Or maybe a
Plane Hack. You know the drill :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: changing svnlook / svnadmin (was: Confusing syntax)

Posted by Blair Zajac <bl...@orcaware.com>.
Garrett Rooney wrote:
> 
> On Wed, Aug 14, 2002 at 09:56:55PM -0400, Daniel Berlin wrote:
> > On Wed, 14 Aug 2002, Garrett Rooney wrote:
> >
> > > On Wed, Aug 14, 2002 at 05:21:41PM -0700, Greg Stein wrote:
> > >
> > > > At lunch, I was talking with the guys, and suggested that we might want to
> > > > replace svnadmin with a Python script. Maybe svnlook, too. Those two
> > > > programs only run on the machine where the repository is located. It might
> > > > be reasonable to say that Python is required for the administrators. (we
> > > > would *never* want to do that for users, tho)
> > > >
> > > > It also means swig and the bindings, tho.
> > >
> > > i'd be -0.5 on this.  i don't like the idea of requiring python (and
> > > swig) for basic functionality.
> >
> > SWIG, sure.
> > Python, however, is very common these days (at least in the unix world, in
> > win32 i could see it being an issue, but i also don't see the majority of
> > win32 users using svnlook or svnadmin anyway)
> 
> even so, if we move svnadmin to python, that means you need python
> before you can even create a local repository, which means everyone
> who wants to just download svn to use it to manage a local project.
> 
> and for SWIG, it's worse, cause we're not even requiring the stable
> version, we're requiring a devel version...  it's just one more
> barrier to some guy downloading it and setting it up.  you have to
> draw the line somewhere, and for lack of a better place to draw it, i
> say do it here.
> 
> basic functionality should require the minimum amount of external
> libraries.  personally, i think that neon, apr, and bdb are a
> reasonable set of requirements, any more, and we're pushing it.

Agreed.  An we already have the tools in C.  If we didn't have them
at all, then I could see writing them in Python.

There's enough work to do on Svn without inventing any more :)

Best,
Blair

-- 
Blair Zajac <bl...@orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/

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

Re: changing svnlook / svnadmin

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Aug 14, 2002 at 10:03:57PM -0400, Garrett Rooney wrote:
>...
> even so, if we move svnadmin to python, that means you need python
> before you can even create a local repository, which means everyone
> who wants to just download svn to use it to manage a local project.

Yah... I kinda thought about that while writing the email. Happily glossed
over it, though, just to get a measure of the wind :-)

Well, I might see about reimp'ing some of the tools in Python (e.g the
svnlook.py example I did a while back). Certainly the shell could be done
and shifted out of the C code.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: changing svnlook / svnadmin (was: Confusing syntax)

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Wed, Aug 14, 2002 at 09:56:55PM -0400, Daniel Berlin wrote:
> On Wed, 14 Aug 2002, Garrett Rooney wrote:
> 
> > On Wed, Aug 14, 2002 at 05:21:41PM -0700, Greg Stein wrote:
> >  
> > > At lunch, I was talking with the guys, and suggested that we might want to
> > > replace svnadmin with a Python script. Maybe svnlook, too. Those two
> > > programs only run on the machine where the repository is located. It might
> > > be reasonable to say that Python is required for the administrators. (we
> > > would *never* want to do that for users, tho)
> > > 
> > > It also means swig and the bindings, tho.
> > 
> > i'd be -0.5 on this.  i don't like the idea of requiring python (and
> > swig) for basic functionality.
> 
> SWIG, sure.
> Python, however, is very common these days (at least in the unix world, in 
> win32 i could see it being an issue, but i also don't see the majority of 
> win32 users using svnlook or svnadmin anyway)

even so, if we move svnadmin to python, that means you need python
before you can even create a local repository, which means everyone
who wants to just download svn to use it to manage a local project.

and for SWIG, it's worse, cause we're not even requiring the stable
version, we're requiring a devel version...  it's just one more
barrier to some guy downloading it and setting it up.  you have to
draw the line somewhere, and for lack of a better place to draw it, i
say do it here.

basic functionality should require the minimum amount of external
libraries.  personally, i think that neon, apr, and bdb are a
reasonable set of requirements, any more, and we're pushing it.

-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: changing svnlook / svnadmin (was: Confusing syntax)

Posted by Branko Čibej <br...@xbc.nu>.
Daniel Berlin wrote:

>Python, however, is very common these days (at least in the unix world, in 
>win32 i could see it being an issue, but i also don't see the majority of 
>win32 users using svnlook or svnadmin anyway)
>  
>

Hah. "Windows is for clients, Unix is for servers." And they can telnet 
to a Unix box to use the SVN command line there, let's stop trying to be 
portable.

Did you notice you hit a nerve? :-)

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: changing svnlook / svnadmin (was: Confusing syntax)

Posted by Daniel Berlin <db...@dberlin.org>.
On Wed, 14 Aug 2002, Garrett Rooney wrote:

> On Wed, Aug 14, 2002 at 05:21:41PM -0700, Greg Stein wrote:
>  
> > At lunch, I was talking with the guys, and suggested that we might want to
> > replace svnadmin with a Python script. Maybe svnlook, too. Those two
> > programs only run on the machine where the repository is located. It might
> > be reasonable to say that Python is required for the administrators. (we
> > would *never* want to do that for users, tho)
> > 
> > It also means swig and the bindings, tho.
> 
> i'd be -0.5 on this.  i don't like the idea of requiring python (and
> swig) for basic functionality.

SWIG, sure.
Python, however, is very common these days (at least in the unix world, in 
win32 i could see it being an issue, but i also don't see the majority of 
win32 users using svnlook or svnadmin anyway)
 > 
> > Maybe we can just say that some of the more esoteric svnadmin/svnlook
> > features are removed in favor of some Python-based tools. (e.g. the "shell"
> > subcommand in svnadmin)
> 
> i'd have less of a problem with this, but for basic stuff, i'm in the
> 'keep the requirement count down' camp, since we already rely on a
> fairly large number of external libraries.
> 
> -garrett 
> 
> 


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

Re: changing svnlook / svnadmin (was: Confusing syntax)

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Wed, Aug 14, 2002 at 05:21:41PM -0700, Greg Stein wrote:
 
> At lunch, I was talking with the guys, and suggested that we might want to
> replace svnadmin with a Python script. Maybe svnlook, too. Those two
> programs only run on the machine where the repository is located. It might
> be reasonable to say that Python is required for the administrators. (we
> would *never* want to do that for users, tho)
> 
> It also means swig and the bindings, tho.

i'd be -0.5 on this.  i don't like the idea of requiring python (and
swig) for basic functionality.

> Maybe we can just say that some of the more esoteric svnadmin/svnlook
> features are removed in favor of some Python-based tools. (e.g. the "shell"
> subcommand in svnadmin)

i'd have less of a problem with this, but for basic stuff, i'm in the
'keep the requirement count down' camp, since we already rely on a
fairly large number of external libraries.

-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

changing svnlook / svnadmin (was: Confusing syntax)

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Aug 14, 2002 at 06:33:22PM -0500, Scott Lamb wrote:
> Karl Fogel wrote:
> > Scott Lamb <sl...@slamb.org> writes:
> >>I was just confused by a couple syntax things:
> >>
> >>1. svnadmin SUBCOMMAND REPOS_PATH
> >>   vs.
> >>   svnlook REPOS_PATH [COMMAND]
> >>
> >>   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.
> 
> If I patched svnlook+docs to be "svnlook COMMAND REPOS_PATH" instead 
> (mandatory command instead of default info), would there be a chance 
> it'd be accepted at this point? I think it's worth changing and better 
> to change it now than post-1.0. And I think it's better to change 
> svnlook than svnadmin because:

I believe that I'm a +0 on changing this. Seems reasonable.

At lunch, I was talking with the guys, and suggested that we might want to
replace svnadmin with a Python script. Maybe svnlook, too. Those two
programs only run on the machine where the repository is located. It might
be reasonable to say that Python is required for the administrators. (we
would *never* want to do that for users, tho)

It also means swig and the bindings, tho.

Maybe we can just say that some of the more esoteric svnadmin/svnlook
features are removed in favor of some Python-based tools. (e.g. the "shell"
subcommand in svnadmin)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: Confusing syntax

Posted by Nuutti Kotivuori <na...@iki.fi>.
Karl Fogel wrote:
> Re: switching to Python: +0, but that's kind of a separate thing.
> We need to continue maintaining the C programs until then.  Besides,
> patching the C progs to have consistent invocation syntax is pretty
> trivial.

How about switching to Perl instead? SWIG can generate bindings for
it, and it's available in places where Python is not.

...

Now while you are twisting your face and thinking of a presentable
reason why it shouldn't be Perl, I'd like to slip in my real point:

C is nice, let's not swap it for scripting-language-of-the-day.

-- Naked

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

Re: Confusing syntax

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Scott Lamb <sl...@slamb.org> writes:
> If I patched svnlook+docs to be "svnlook COMMAND REPOS_PATH" instead
> (mandatory command instead of default info), would there be a chance
> it'd be accepted at this point? I think it's worth changing and better
> to change it now than post-1.0. And I think it's better to change
> svnlook than svnadmin because:

+1 on the change; looking forward to the patch :-).

Re: switching to Python: +0, but that's kind of a separate thing.  We
need to continue maintaining the C programs until then.  Besides,
patching the C progs to have consistent invocation syntax is pretty
trivial.

-K

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

Re: Confusing syntax

Posted by Scott Lamb <sl...@slamb.org>.
Karl Fogel wrote:
> Scott Lamb <sl...@slamb.org> writes:
> 
>>I was just confused by a couple syntax things:
>>
>>1. svnadmin SUBCOMMAND REPOS_PATH
>>   vs.
>>   svnlook REPOS_PATH [COMMAND]
>>
>>   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.

If I patched svnlook+docs to be "svnlook COMMAND REPOS_PATH" instead 
(mandatory command instead of default info), would there be a chance 
it'd be accepted at this point? I think it's worth changing and better 
to change it now than post-1.0. And I think it's better to change 
svnlook than svnadmin because:

- svnadmin is probably used much more often, so it'd be less of a shock.
- IMHO, command repos makes more sense than the other way around.
- This way is more consistent with svn also:
   svn COMMAND [TARGETS]

It would mean everyone would have to recopy their commit-email.pl script 
and probably change other hook scripts.

-- 
Scott Lamb


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

[PATCH] Error out on cvs-style -rM -rN syntax

Posted by Scott Lamb <sl...@slamb.org>.
* subversion/clients/cmdline/main.c:
  (main): Error out on CVS-style '-rM -rN' syntax and suggest -rM:N
  instead.

Index: subversion/clients/cmdline/main.c
===================================================================
--- subversion/clients/cmdline/main.c
+++ subversion/clients/cmdline/main.c	Wed Aug 14 15:27:08 2002
@@ -948,6 +948,17 @@
         opt_state.message = apr_pstrdup (pool, opt_arg);
         break;
       case 'r':
+        if (opt_state.start_revision.kind != svn_client_revision_unspecified)
+          {
+            svn_handle_error (svn_error_create
+                              (SVN_ERR_CL_ARG_PARSING_ERROR,
+                               0, NULL, pool,
+                               "Multiple revision arguments encountered. "
+                               "Try -rM:N instead of -rM -rN"),
+                              stderr, FALSE);
+            svn_pool_destroy (pool);
+            return EXIT_FAILURE;
+          }
         ret = svn_cl__parse_revision (&opt_state, opt_arg, pool);
         if (ret)
           {

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