[MERGE] line-endings support: part 1 of 2: versioned properties
Neil Martinsen-Burrell
nmb at wartburg.edu
Mon Apr 14 17:02:17 BST 2008
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. (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.
-Neil
More information about the bazaar
mailing list