You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2003/11/17 00:28:25 UTC

Re: svn commit: rev 7773 - in trunk/subversion: include svnversion

On Sun, 2003-11-16 at 18:15, philip@tigris.org wrote:
> Add -c (last changed) and -n (no newline) options to svnversion.

-n for no newline?  Is there any precedent for this in any other Unix
utility?


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

Re: svn commit: rev 7773 - in trunk/subversion: include svnversion

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Nov 16, 2003, at 7:28 PM, Greg Hudson wrote:

> On Sun, 2003-11-16 at 18:15, philip@tigris.org wrote:
>> Add -c (last changed) and -n (no newline) options to svnversion.
>
> -n for no newline?  Is there any precedent for this in any other Unix
> utility?

echo -n

-garrett


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

Re: --no-newline and --strict [was: Re: svn commit: rev 7773 - in trunk/subversion: include svnversion]

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Julian Foad <ju...@btopenworld.com> writes:

> How about replacing --strict with:

[...]

>   "svn log":
>     --ignore-history or --no-follow-history

Part of issue 928
(http://subversion.tigris.org/issues/show_bug.cgi?id=928) is
replacing svn log's --strict option with --follow-none.

--  
Eric Gillespie <*> epg@pretzelnet.org

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

--no-newline and --strict [was: Re: svn commit: rev 7773 - in trunk/subversion: include svnversion]

Posted by Julian Foad <ju...@btopenworld.com>.
Philip Martin wrote:
> Greg Hudson <gh...@MIT.EDU> writes:
> 
>>I'm questioning the feature as a whole.
> 
> There has been a request in the past for output without a newline, and
> my original concept for svnversion didn't output a newline as that
> makes the output more suitable for use in source code.  I only added
> the newline when I abandoned the idea of using svnversion during the
> Subversion build.  I would have made it optional but there was no code
> in svnversion to handle command line options...

We should at least make the option consistent with other Subversion commands, such as the option for not adding a newline in "svn propget".  "propget" currently uses "--strict" to suppress the newline and various other stuff, whereas "log" currently uses "strict" for something completely different.  Obviously that is a mess and not the intention behind having "common options".

So your option --no-newline (-n) is probably a good, common option that we should port into "svn propget", and we should ditch "--strict" because it is too general a word (like "force") and replace it with options that say what they mean.

How about replacing --strict with:

  "svn propget":
    --no-filename (taken from GNU grep) to suppress the file name in multi-file output;
    --no-newline to suppress the newline after the value.

  "svn log":
    --ignore-history or --no-follow-history

I might even do the work if we agree on it.  :-)

- Julian


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

Re: svn commit: rev 7773 - in trunk/subversion: include svnversion

Posted by Philip Martin <ph...@codematters.co.uk>.
Greg Hudson <gh...@MIT.EDU> writes:

> I'm questioning the feature as a whole.

There has been a request in the past for output without a newline, and
my original concept for svnversion didn't output a newline as that
makes the output more suitable for use in source code.  I only added
the newline when I abandoned the idea of using svnversion during the
Subversion build.  I would have made it optional but there was no code
in svnversion to handle command line options...

-- 
Philip Martin

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

Re: svn commit: rev 7773 - in trunk/subversion: include svnversion

Posted by Greg Hudson <gh...@MIT.EDU>.
On Sun, 2003-11-16 at 19:48, Philip Martin wrote:
> Are you questioning the choice of -n or the feature as a whole?  echo
> is the example I had in mind when choosing -n, putting the output into
> a source code string is the application I had in mind when
> implementing the feature,

I'm questioning the feature as a whole.  /bin/sh scripts are perfectly
capable of tolerating a newline for this kind of thing, and I don't see
why svnversion should have this feature when essentially no one else in
the same position does so.

If we do have the feature, -n is a fine option name for it, since the
other meaning ("dry run") doesn't apply to informational commands.


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

Re: svn commit: rev 7773 - in trunk/subversion: include svnversion

Posted by Philip Martin <ph...@codematters.co.uk>.
Greg Hudson <gh...@MIT.EDU> writes:

> On Sun, 2003-11-16 at 19:36, Philip Martin wrote:
>> > -n for no newline?  Is there any precedent for this in any other Unix
>> > utility?
>> 
>> echo
>
> Sorry, I meant among utilities which are similar to svnversion, in that
> they retrieve information and spit it out.  "echo" is a bit of a special
> case, and a poorly-handled one at that.

Are you questioning the choice of -n or the feature as a whole?  echo
is the example I had in mind when choosing -n, putting the output into
a source code string is the application I had in mind when
implementing the feature,

-- 
Philip Martin

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

Re: svn commit: rev 7773 - in trunk/subversion: include svnversion

Posted by Greg Hudson <gh...@MIT.EDU>.
On Sun, 2003-11-16 at 19:36, Philip Martin wrote:
> > -n for no newline?  Is there any precedent for this in any other Unix
> > utility?
> 
> echo

Sorry, I meant among utilities which are similar to svnversion, in that
they retrieve information and spit it out.  "echo" is a bit of a special
case, and a poorly-handled one at that.


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

Re: svn commit: rev 7773 - in trunk/subversion: include svnversion

Posted by Philip Martin <ph...@codematters.co.uk>.
Greg Hudson <gh...@MIT.EDU> writes:

> On Sun, 2003-11-16 at 18:15, philip@tigris.org wrote:
>> Add -c (last changed) and -n (no newline) options to svnversion.
>
> -n for no newline?  Is there any precedent for this in any other Unix
> utility?

echo

-- 
Philip Martin

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