~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ignores.py

  • Committer: Patch Queue Manager
  • Date: 2016-01-15 09:21:49 UTC
  • mfrom: (6606.2.1 autodoc-unicode)
  • Revision ID: pqm@pqm.ubuntu.com-20160115092149-z5f4sfq3jvaz0enb
(vila) Fix autodoc runner when LANG=C. (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
41
45
    '*~',
42
46
    '.#*',
43
47
    '[#]*#',
 
48
    '__pycache__',
 
49
    'bzr-orphans',
44
50
]
45
51
 
46
52
 
67
73
                unicode_lines.append(line.decode('utf-8'))
68
74
            except UnicodeDecodeError:
69
75
                # report error about line (idx+1)
70
 
                warning('.bzrignore: On Line #%d, malformed utf8 character. '
 
76
                trace.warning(
 
77
                        '.bzrignore: On Line #%d, malformed utf8 character. '
71
78
                        'Ignoring line.' % (line_number+1))
72
79
 
73
80
    # Append each line to ignore list if it's not a comment line