~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ignores.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 08:15:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101008081514-dviqzrdfwyzsqbz2
Split NEWS into per-release doc/en/release-notes/bzr-*.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
16
16
 
17
17
"""Lists of ignore files, etc."""
18
18
 
19
 
from __future__ import absolute_import
20
 
 
21
19
import errno
22
20
import os
23
21
from cStringIO import StringIO
24
22
 
25
23
import bzrlib
26
 
from bzrlib.lazy_import import lazy_import
27
 
lazy_import(globals(), """
28
24
from bzrlib import (
29
25
    atomicfile,
30
26
    config,
31
27
    globbing,
32
 
    trace,
33
28
    )
34
 
""")
 
29
 
 
30
from trace import warning
35
31
 
36
32
# ~/.bazaar/ignore will be filled out using
37
33
# this ignore list, if it does not exist
46
42
    '.#*',
47
43
    '[#]*#',
48
44
    '__pycache__',
49
 
    'bzr-orphans',
50
45
]
51
46
 
52
47
 
73
68
                unicode_lines.append(line.decode('utf-8'))
74
69
            except UnicodeDecodeError:
75
70
                # report error about line (idx+1)
76
 
                trace.warning(
77
 
                        '.bzrignore: On Line #%d, malformed utf8 character. '
 
71
                warning('.bzrignore: On Line #%d, malformed utf8 character. '
78
72
                        'Ignoring line.' % (line_number+1))
79
73
 
80
74
    # Append each line to ignore list if it's not a comment line