~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ignores.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-30 16:43:12 UTC
  • mto: (1711.2.111 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: bialix@ukr.net-20060730164312-b025fd3ff0cee59e
rename  gpl.txt => COPYING.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Development 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 (
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
105
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)
170
166
        if ignore not in ignored:
171
167
            ignored.add(ignore)
172
168
            to_add.append(ignore)
192
188
 
193
189
    This is used by some plugins that want bzr to ignore files,
194
190
    but don't want to change a users ignore list.
195
 
    (Such as a conversion script that needs to ignore temporary files,
196
 
    but does not want to modify the project's ignore list.)
 
191
    (Such as a conversion script, that needs to ignore some files,
 
192
    but must preserve as much of the exact content boing converted.)
197
193
 
198
194
    :param ignores: A list or generator of ignore patterns.
199
195
    :return: None