You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@xbc.nu> on 2004/06/18 06:22:24 UTC
Re: svn commit: r10025 - trunk/subversion/svnlook
kfogel@tigris.org wrote:
>Author: kfogel
>Date: Fri Jun 18 00:10:37 2004
>New Revision: 10025
>
>Modified:
> trunk/subversion/svnlook/main.c
>Log:
>Fix issue #1930: 'svnlook diff -rX:Y' should fail outright.
>
>* subversion/svnlook/main.c
> (main): Parse revision number more carefully.
>
>
Seems to me this would be a candidate for a utility in libsvn_subr,
perhaps in opt.c or cmdline.c?
--
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: svn commit: r10025 - trunk/subversion/svnlook
Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:
>Greg Hudson <gh...@MIT.EDU> writes:
>
>
>>>Er, the whole point was that 'svnlook' does not accept the -rX:Y
>>>syntax that other commands accept.
>>>
>>>
>>"svn up -r X:Y" isn't accepted either.
>>
>>
>
>D'oh!
>
>/me ducks in embarrassment :)
>
>
>
>>Supporting -r{DATE} in svnlook sounds like a fine idea. You weren't
>>really fixing a bug so much as tightening up a parser, so your change
>>isn't really appropriate for back-porting anyway.
>>
>>
>
>I see what you're saying -- the compat issue doesn't matter so much,
>so why not do it?
>
>One question: if we're going to use the regular parser anyway, why not
>just accept the full -rX:Y syntax?
>
>The only reason we don't automatically translate
>
> $ svn diff -r7
>
>into
>
> $ svn diff -r6:7
>
>is because of the complications introduced by having a working copy
>(and thereby implied base revisions). But svnlook doesn't have this
>problem, so it could keep its current semantics *and* support -rX:Y.
>
>Any objections?
>
>
None at all, as long as the single-rev variant's semantics don't change.
But I don't have to tell /you/ that, do I. :-)
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r10025 - trunk/subversion/svnlook
Posted by kf...@collab.net.
Greg Hudson <gh...@MIT.EDU> writes:
> > Er, the whole point was that 'svnlook' does not accept the -rX:Y
> > syntax that other commands accept.
>
> "svn up -r X:Y" isn't accepted either.
D'oh!
/me ducks in embarrassment :)
> Supporting -r{DATE} in svnlook sounds like a fine idea. You weren't
> really fixing a bug so much as tightening up a parser, so your change
> isn't really appropriate for back-porting anyway.
I see what you're saying -- the compat issue doesn't matter so much,
so why not do it?
One question: if we're going to use the regular parser anyway, why not
just accept the full -rX:Y syntax?
The only reason we don't automatically translate
$ svn diff -r7
into
$ svn diff -r6:7
is because of the complications introduced by having a working copy
(and thereby implied base revisions). But svnlook doesn't have this
problem, so it could keep its current semantics *and* support -rX:Y.
Any objections?
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r10025 - trunk/subversion/svnlook
Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2004-06-18 at 11:27, kfogel@collab.net wrote:
> Branko Čibej <br...@xbc.nu> writes:
> > >Does someone other than 'svnlook' use this particular limited -r
> > >syntax?
> >
> > "svn up" comes to mind.
>
> Er, the whole point was that 'svnlook' does not accept the -rX:Y
> syntax that other commands accept.
"svn up -r X:Y" isn't accepted either.
> > Really, that's just a special case of our -r
> > X[:Y] syntax, so you should be able to use the common parser in
> > svnlook and simply bail out if the second rev is given.
>
> Yes, the common parser bails correctly, and the strategy you describe
> above would work. But it's a much more involved change -- we'd have
> to start using svn_opt_revision_t, which means all of a sudden we're
> supporting -r{DATE} syntax in svnlook (!), which means now we're
> adding a new feature, when all I meant to do was fix a bug.
>
> I didn't really want to go down that road.
Supporting -r{DATE} in svnlook sounds like a fine idea. You weren't
really fixing a bug so much as tightening up a parser, so your change
isn't really appropriate for back-porting anyway.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r10025 - trunk/subversion/svnlook
Posted by kf...@collab.net.
Branko Čibej <br...@xbc.nu> writes:
> >Does someone other than 'svnlook' use this particular limited -r
> >syntax?
>
> "svn up" comes to mind.
Er, the whole point was that 'svnlook' does not accept the -rX:Y
syntax that other commands accept. Hence the words "use this
particular limited -r syntax" in my question :-).
> Really, that's just a special case of our -r
> X[:Y] syntax, so you should be able to use the common parser in
> svnlook and simply bail out if the second rev is given.
Yes, the common parser bails correctly, and the strategy you describe
above would work. But it's a much more involved change -- we'd have
to start using svn_opt_revision_t, which means all of a sudden we're
supporting -r{DATE} syntax in svnlook (!), which means now we're
adding a new feature, when all I meant to do was fix a bug.
I didn't really want to go down that road.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r10025 - trunk/subversion/svnlook
Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:
>Branko Čibej <br...@xbc.nu> writes:
>
>
>>>Author: kfogel
>>>Date: Fri Jun 18 00:10:37 2004
>>>New Revision: 10025
>>>
>>>Modified:
>>> trunk/subversion/svnlook/main.c
>>>Log:
>>>Fix issue #1930: 'svnlook diff -rX:Y' should fail outright.
>>>
>>>* subversion/svnlook/main.c
>>> (main): Parse revision number more carefully.
>>>
>>>
>>Seems to me this would be a candidate for a utility in libsvn_subr,
>>perhaps in opt.c or cmdline.c?
>>
>>
>
>Does someone other than 'svnlook' use this particular limited -r
>syntax?
>
"svn up" comes to mind. Really, that's just a special case of our -r
X[:Y] syntax, so you should be able to use the common parser in svnlook
and simply bail out if the second rev is given.
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r10025 - trunk/subversion/svnlook
Posted by kf...@collab.net.
Branko Čibej <br...@xbc.nu> writes:
> >Author: kfogel
> >Date: Fri Jun 18 00:10:37 2004
> >New Revision: 10025
> >
> >Modified:
> > trunk/subversion/svnlook/main.c
> >Log:
> >Fix issue #1930: 'svnlook diff -rX:Y' should fail outright.
> >
> >* subversion/svnlook/main.c
> > (main): Parse revision number more carefully.
>
> Seems to me this would be a candidate for a utility in libsvn_subr,
> perhaps in opt.c or cmdline.c?
Does someone other than 'svnlook' use this particular limited -r
syntax?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org