~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ignores.py

  • Committer: Patch Queue Manager
  • Date: 2016-04-21 04:10:52 UTC
  • mfrom: (6616.1.1 fix-en-user-guide)
  • Revision ID: pqm@pqm.ubuntu.com-20160421041052-clcye7ns1qcl2n7w
(richard-wilbur) Ensure build of English use guide always uses English text
 even when user's locale specifies a different language. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-2011 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
 
19
21
import errno
20
22
import os
21
23
from cStringIO import StringIO
22
24
 
23
25
import bzrlib
 
26
from bzrlib.lazy_import import lazy_import
 
27
lazy_import(globals(), """
24
28
from bzrlib import (
25
29
    atomicfile,
26
30
    config,
27
31
    globbing,
 
32
    trace,
28
33
    )
29
 
 
30
 
from trace import warning
 
34
""")
31
35
 
32
36
# ~/.bazaar/ignore will be filled out using
33
37
# this ignore list, if it does not exist
42
46
    '.#*',
43
47
    '[#]*#',
44
48
    '__pycache__',
 
49
    'bzr-orphans',
45
50
]
46
51
 
47
52
 
68
73
                unicode_lines.append(line.decode('utf-8'))
69
74
            except UnicodeDecodeError:
70
75
                # report error about line (idx+1)
71
 
                warning('.bzrignore: On Line #%d, malformed utf8 character. '
 
76
                trace.warning(
 
77
                        '.bzrignore: On Line #%d, malformed utf8 character. '
72
78
                        'Ignoring line.' % (line_number+1))
73
79
 
74
80
    # Append each line to ignore list if it's not a comment line