/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/ignores.py

  • Committer: Andrew Bennetts
  • Date: 2010-04-29 05:52:35 UTC
  • mfrom: (5192 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5193.
  • Revision ID: andrew.bennetts@canonical.com-20100429055235-24e81jfdse3h3ugt
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 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
27
27
 
28
28
from trace import warning
29
29
 
30
 
# This was the full ignore list for bzr 0.8
31
 
# please keep these sorted (in C locale order) to aid merging
32
 
OLD_DEFAULTS = [
33
 
    '#*#',
34
 
    '*$',
35
 
    '*,v',
36
 
    '*.BAK',
37
 
    '*.a',
38
 
    '*.bak',
39
 
    '*.elc',
40
 
    '*.exe',
41
 
    '*.la',
42
 
    '*.lo',
43
 
    '*.o',
44
 
    '*.obj',
45
 
    '*.orig',
46
 
    '*.py[oc]',
47
 
    '*.so',
48
 
    '*.tmp',
49
 
    '*~',
50
 
    '.#*',
51
 
    '.*.sw[nop]',
52
 
    '.*.tmp',
53
 
    # Our setup tests dump .python-eggs in the bzr source tree root
54
 
    './.python-eggs',
55
 
    '.DS_Store',
56
 
    '.arch-ids',
57
 
    '.arch-inventory',
58
 
    '.bzr.log',
59
 
    '.del-*',
60
 
    '.git',
61
 
    '.hg',
62
 
    '.jamdeps'
63
 
    '.libs',
64
 
    '.make.state',
65
 
    '.sconsign*',
66
 
    '.svn',
67
 
    '.sw[nop]',    # vim editing nameless file
68
 
    '.tmp*',
69
 
    'BitKeeper',
70
 
    'CVS',
71
 
    'CVS.adm',
72
 
    'RCS',
73
 
    'SCCS',
74
 
    'TAGS',
75
 
    '_darcs',
76
 
    'aclocal.m4',
77
 
    'autom4te*',
78
 
    'config.h',
79
 
    'config.h.in',
80
 
    'config.log',
81
 
    'config.status',
82
 
    'config.sub',
83
 
    'stamp-h',
84
 
    'stamp-h.in',
85
 
    'stamp-h1',
86
 
    '{arch}',
87
 
]
88
 
 
89
 
 
90
30
# ~/.bazaar/ignore will be filled out using
91
31
# this ignore list, if it does not exist
92
32
# please keep these sorted (in C locale order) to aid merging
119
59
        # Otherwise go though line by line and pick out the 'good'
120
60
        # decodable lines
121
61
        lines = ignore_file.split('\n')
122
 
        unicode_lines = []    
 
62
        unicode_lines = []
123
63
        for line_number, line in enumerate(lines):
124
64
            try:
125
65
                unicode_lines.append(line.decode('utf-8'))
127
67
                # report error about line (idx+1)
128
68
                warning('.bzrignore: On Line #%d, malformed utf8 character. '
129
69
                        'Ignoring line.' % (line_number+1))
130
 
    
 
70
 
131
71
    # Append each line to ignore list if it's not a comment line
132
72
    for line in unicode_lines:
133
73
        line = line.rstrip('\r\n')