You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2005/07/31 16:14:08 UTC

[PATCH] Improve error checking for rev-prop commands (incl. issue #2364)

Issue #2364 says "--revprop doesn't work with -r BASE/COMMITTED/PREV but [does] 
with HEAD".

My analysis is that there are two issues here.

1. It was never intended that a working copy item should be specified as the 
target for operating on a revision property.  It is accepted, but the 
documentation doesn't mention it: the help says "[URL]".  Therefore there is no 
reason why a revision should be able to be specified relative to a WC target. 
However, the error message for such an attempt was inappropriate:

   $ svn proplist --revprop -r BASE
   svn: A path under version control is needed for this operation

The new error message with this patch is:

   $ svn proplist --revprop -r BASE
   svn: Must specify revision explicitly, and not relative to a WC item, when 
operating on a revision property


2. Maybe we want an enhancement to allow the revision to be specified relative 
to a WC item.  I don't see any particular arguments for or against that.


The attached patch fixes that error message and does some more besides.  I'll 
leave point 2 for now.  Reviews or thoughts, please.

- Julian

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

Re: [PATCH] Improve error checking for rev-prop commands (incl. issue #2364)

Posted by Julian Foad <ju...@btopenworld.com>.
Peter N. Lundblad wrote:
> On Sun, 31 Jul 2005, Julian Foad wrote:
> 
>>>The new error message with this patch is:
>>>
>>>  $ svn proplist --revprop -r BASE
>>>  svn: Must specify revision explicitly, and not relative to a WC item,
>>>when operating on a revision property
> 
> This seems a little cryptic. What about:
> Only a number, date or HEAD is valid as a revision when operating on...
> or something?
> 
>>[...]
> 
> Else this looks good to me.

Thanks.  I took your suggestion and committed the patch in r15542.

- Julian

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

Re: [PATCH] Improve error checking for rev-prop commands (incl. issue #2364)

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Sun, 31 Jul 2005, Julian Foad wrote:

> Julian Foad wrote:
> [...]
> > 1. It was never intended that a working copy item should be specified as
> > the target for operating on a revision property.  It is accepted, but
> > the documentation doesn't mention it: the help says "[URL]".  Therefore
> > there is no reason why a revision should be able to be specified
> > relative to a WC target. However, the error message for such an attempt
> > was inappropriate:
> >
> >   $ svn proplist --revprop -r BASE
> >   svn: A path under version control is needed for this operation
> >
> > The new error message with this patch is:
> >
> >   $ svn proplist --revprop -r BASE
> >   svn: Must specify revision explicitly, and not relative to a WC item,
> > when operating on a revision property
> >
This seems a little cryptic. What about:
Only a number, date or HEAD is valid as a revision when operating on...
or something?


> [...]
> >

Else this looks good to me.

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

Re: [PATCH] Improve error checking for rev-prop commands (incl. issue #2364)

Posted by Julian Foad <ju...@btopenworld.com>.
Julian Foad wrote:
[...]
> 1. It was never intended that a working copy item should be specified as 
> the target for operating on a revision property.  It is accepted, but 
> the documentation doesn't mention it: the help says "[URL]".  Therefore 
> there is no reason why a revision should be able to be specified 
> relative to a WC target. However, the error message for such an attempt 
> was inappropriate:
> 
>   $ svn proplist --revprop -r BASE
>   svn: A path under version control is needed for this operation
> 
> The new error message with this patch is:
> 
>   $ svn proplist --revprop -r BASE
>   svn: Must specify revision explicitly, and not relative to a WC item, 
> when operating on a revision property
> 
[...]
> 
> The attached patch fixes that error message and does some more besides.  
> I'll leave point 2 for now.  Reviews or thoughts, please.

... and, this time, the patch is attached.

- Julian

Re: [PATCH] Improve error checking for rev-prop commands (incl. issue #2364)

Posted by Julian Foad <ju...@btopenworld.com>.
Ben Gollmer wrote:
> Julian Foad wrote:
> 
>>Issue #2364 says "--revprop doesn't work with -r BASE/COMMITTED/PREV but
>>[does] with HEAD".
>>
>>My analysis is that there are two issues here.
>>
>>1. It was never intended that a working copy item should be specified as
>>the target for operating on a revision property.  It is accepted, but
>>the documentation doesn't mention it: the help says "[URL]".  Therefore
>>there is no reason why a revision should be able to be specified
>>relative to a WC target.
> 
> This won't block custom revprops from being set (issue 1976), will it? I

No.  All this is saying is that you can't specify the revision by reference to 
a working-copy path with "BASE" or "COMMITTED" or "PREV"; you can still specify 
a working copy path and "HEAD", or you can specify (a WC path or URL) with (a 
revision number or date).  Plenty of options!

> guess as long as the `svn propset --revprop` syntax isn't used to set
> them, it won't be an issue.

Er, well, indeed, it won't be an issue if you have some other way of setting 
them ... but then this won't stop you from setting any rev-props you like even 
if you do use the normal "svn propset --revprop" syntax.

- Julian

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

Re: [PATCH] Improve error checking for rev-prop commands (incl. issue #2364)

Posted by Ben Gollmer <be...@jatosoft.com>.
Julian Foad wrote:
> Issue #2364 says "--revprop doesn't work with -r BASE/COMMITTED/PREV but
> [does] with HEAD".
> 
> My analysis is that there are two issues here.
> 
> 1. It was never intended that a working copy item should be specified as
> the target for operating on a revision property.  It is accepted, but
> the documentation doesn't mention it: the help says "[URL]".  Therefore
> there is no reason why a revision should be able to be specified
> relative to a WC target.

This won't block custom revprops from being set (issue 1976), will it? I
guess as long as the `svn propset --revprop` syntax isn't used to set
them, it won't be an issue.

-- 
Ben