[MERGE] line-endings support: part 1 of 2: versioned properties

Alexander Belchenko bialix at ukr.net
Mon Apr 14 17:36:26 BST 2008


Neil Martinsen-Burrell пишет:
> Nicholas Allen <allen <at> ableton.com> writes:
> 
> 
>> Also I think the property name and value as first two arguments makes 
>> more sense from the user's point of view because the command changes a 
>> property and so the property name and value are the most important part. 
>> Perhaps the notation name=value would also be better rather than having 
>> a space (it is easier to see what you mean and would catch error when 
>> you don't do this). e.g:
>>
>> bzr prop-set name=value file1 file2 file3....
>>
>> For me this is the clearest and most logical syntax but I understand 
>> that this is a matter of taste/opinion and others may disagree. Another 
>> nice thing about this syntax is you could set multiple properties with 
>> one command:
>>
>> bzr prop-set name1=value1 name2=value2 file1 file2 file3....
>>
>> I like the equals sign because it makes it very clear what is a property 
>> name and what is a value on the command line and these cannot be 
>> confused with file names either.
> 
> I agree that this looks like the best structure for this command line.  One
> (tangential) data point is that Subversion's propset command is of the form "svn
> propset PROPNAME PROPVAL PATH...", so this structure comports with a "standard".
>  On the downside of the Subversion way, I find it confusing that the name and
> value are not connected in any way, and spaces are particularly complicated to
> place into property values.

Why it so? Does the quoting of value is not work at all for you? I.e.

svn propset foo "spam eggs fish" PATH...

As I know this at least should works on Windows.

>  (Is that also the case here?)  With Nick's
> suggestion, I also like the ability to set multiple properties with a single
> command.
> 
> I think that a good set of examples in "bzr help prop-set" will emphasize that
> glob expansion can be done at runtime (using a quoted pattern).  As well, the
> usage message could be "prop-set PROPNAME=PROPVAL ... PATTERN ..." with some
> explanation then of what is a legal pattern (a filename (including a path?) or a
> glob expression).  

> In fact, we could leverage some of the code, as well as some
> mental complexity by making the possible patterns in prop-set the same as the
> patterns in ignore.

Currently my code assume that filemasks should always start with '*'. It's makes
the implementation much simpler.



More information about the bazaar mailing list