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

Alexander Belchenko bialix at ukr.net
Mon Apr 14 15:46:37 BST 2008

Nicholas Allen пишет:
> |>
> |> I may want to give a list of file names to set the properties on and 
> not just one file. All bzr commands have the file names at the end so 
> this would make sense to me and would be consistent with the other bzr 
> commands. Then I can do:
> |>
> |> bzr prop-set prop-name prop-value file1 file2 file2 pattern1 pattern2 
> etc
> |
> | May be. But I'm not in favour of this.
> Can you explain why?

Your use case does not sound for me as the primary one.
As I said I don't expect that properties will be changed often.
Of course, they could do, but in reality, why for?

Well, I'm lacks of imagination and can't say for sure
how the best UI design should looks like. May be Martin Pool
can give some advices? I think if you need mass change of properties
you could use for-loop in your shell, is not?

This is good to have discussion about UI sooner than later, and may be
you're right. I just want to make it clear in UI and corresponding
documentation that filemasks could be used "as is" without glob expansions,
because bzr will do glob expansions in runtime.

> 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.

Hmm, it seems like a really good idea.  But if you want to specify more than one
pair name=value you can't mix it with more than one filename/filemasks and
vice versa. Otherwise parsing of command line arguments will be real pain.

More information about the bazaar mailing list