~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ignores.py

  • Committer: Alexander Belchenko
  • Date: 2007-02-17 07:11:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2304.
  • Revision ID: bialix@ukr.net-20070217071147-pc4zm6d4rc8zqv77
Bugfix #85599: ``bzr init`` works with unicode argument LOCATION

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import errno
20
20
 
21
 
from bzrlib import (
22
 
    config,
23
 
    globbing,
24
 
    )
 
21
from bzrlib import config
25
22
 
26
23
# This was the full ignore list for bzr 0.8
27
24
# please keep these sorted (in C locale order) to aid merging
102
99
    """Read in all of the lines in the file and turn it into an ignore list"""
103
100
    ignored = set()
104
101
    for line in f.read().decode('utf8').split('\n'):
105
 
        line = line.rstrip('\r\n')
 
102
        line = line.rstrip('/\r\n')
106
103
        if not line or line.startswith('#'):
107
104
            continue
108
 
        ignored.add(globbing.normalize_pattern(line))
 
105
        ignored.add(line)
109
106
    return ignored
110
107
 
111
108
 
166
163
    ignored = get_user_ignores()
167
164
    to_add = []
168
165
    for ignore in new_ignores:
169
 
        ignore = globbing.normalize_pattern(ignore)
 
166
        ignore = ignore.rstrip('/')
170
167
        if ignore not in ignored:
171
168
            ignored.add(ignore)
172
169
            to_add.append(ignore)