[MERGE] Add ignore patterns into bzr.dev
Wayne Davison
wayned at samba.org
Thu Jul 6 23:39:51 BST 2006
On Tue, Jul 04, 2006 at 11:03:10AM +1000, Martin Pool wrote:
> Could you repost that please?
This just adds the parsing of the ~/.bazaar/ignore file without updating
any test-cases or anything else.
..wayne..
-------------- next part --------------
--- bzrlib/workingtree.py 2006-07-03 04:59:44 +0000
+++ bzrlib/workingtree.py 2006-07-06 22:35:35 +0000
@@ -54,6 +54,7 @@
from bzrlib.atomicfile import AtomicFile
from bzrlib.conflicts import Conflict, ConflictList, CONFLICT_SUFFIXES
import bzrlib.bzrdir as bzrdir
+import bzrlib.config as config
from bzrlib.decorators import needs_read_lock, needs_write_lock
import bzrlib.errors as errors
from bzrlib.errors import (BzrCheckError,
@@ -1080,6 +1081,12 @@
return self._ignorelist
l = []
+ global_ignore = pathjoin(config.config_dir(), 'ignore')
+ try:
+ f = file(global_ignore, 'rb')
+ l.extend([line.rstrip("\n\r") for line in f.readlines()])
+ except:
+ pass
if self.has_filename(bzrlib.IGNORE_FILENAME):
f = self.get_file_byname(bzrlib.IGNORE_FILENAME)
l.extend([line.rstrip("\n\r").decode('utf-8')
More information about the bazaar
mailing list