[MERGE] per-user file properties

Ian Clatworthy ian.clatworthy at internode.on.net
Tue May 6 07:39:50 BST 2008


This patch provides the plumbing for finding and reading per-user file
properties. This feature is a building block for EOL support. However,
it has been explicitly designed to be a generic capability and ought to
be suitable for configuring other interesting things like custom diff
and merge algorithms.

Properties are defined in the BAZAAR_HOME/.bzrproperties file using an
ini file syntax where the section headings are patterns and the section
contents are the properties. Patterns use the same syntax as that used
by .bzrignore files. Here is an example:

  [*.py]
  eol = exact

  [*.pdf]
  text = False

Note that patterns are explicitly ordered - the first one matching wins.
This implies that more explicit patterns should be placed at the top of
the file and more general patterns towards the end.

In the future, core features and plugins can assign meaning to various
properties. Doing that is beyond the scope of this patch.

A future enhancement may also support .bzrproperties files in places
other than BAZAAR_HOME. If and when we decide to do that, I think that's
a small change code wise (over and above this patch). For now, the
consensus is that we should first gain experience with a simple
implementation of file properties (e.g. the one proposed by this patch)
before introducing the additional complexity implied by the various
extended schemes.

Ian C.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: per-user-file-properties.patch
Type: text/x-diff
Size: 17120 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080506/a4962742/attachment.bin 


More information about the bazaar mailing list