~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ignores.py

  • Committer: Aaron Bentley
  • Date: 2006-11-17 04:06:03 UTC
  • mfrom: (2139 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2162.
  • Revision ID: aaron.bentley@utoronto.ca-20061117040603-pgebxndswvwk26tt
Merge from 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
92
92
    '*~',
93
93
    '.#*',
94
94
    '[#]*#',
 
95
    './bzr-commit-*',
95
96
]
96
97
 
97
98
 
99
100
    """Read in all of the lines in the file and turn it into an ignore list"""
100
101
    ignored = set()
101
102
    for line in f.read().decode('utf8').split('\n'):
102
 
        line = line.rstrip('\r\n')
 
103
        line = line.rstrip('/\r\n')
103
104
        if not line or line.startswith('#'):
104
105
            continue
105
106
        ignored.add(line)
163
164
    ignored = get_user_ignores()
164
165
    to_add = []
165
166
    for ignore in new_ignores:
 
167
        ignore = ignore.rstrip('/')
166
168
        if ignore not in ignored:
167
169
            ignored.add(ignore)
168
170
            to_add.append(ignore)