~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ignores.py

  • Committer: Robert Collins
  • Date: 2007-07-04 08:08:13 UTC
  • mfrom: (2572 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2587.
  • Revision ID: robertc@robertcollins.net-20070704080813-wzebx0r88fvwj5rq
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Development Ltd
 
1
# Copyright (C) 2005, 2006 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
18
18
 
19
19
import errno
20
20
 
21
 
from bzrlib import config
 
21
from bzrlib import (
 
22
    config,
 
23
    globbing,
 
24
    )
22
25
 
23
26
# This was the full ignore list for bzr 0.8
24
27
# please keep these sorted (in C locale order) to aid merging
102
105
        line = line.rstrip('\r\n')
103
106
        if not line or line.startswith('#'):
104
107
            continue
105
 
        ignored.add(line)
 
108
        ignored.add(globbing.normalize_pattern(line))
106
109
    return ignored
107
110
 
108
111
 
163
166
    ignored = get_user_ignores()
164
167
    to_add = []
165
168
    for ignore in new_ignores:
 
169
        ignore = globbing.normalize_pattern(ignore)
166
170
        if ignore not in ignored:
167
171
            ignored.add(ignore)
168
172
            to_add.append(ignore)