/breezy-svn/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy-svn/trunk

« back to all changes in this revision

Viewing changes to workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2008-03-27 01:13:59 UTC
  • mfrom: (525.1.3 ignore)
  • Revision ID: jelmer@samba.org-20080327011359-sj61cudcg73hve71
Merge utility code for ignores.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
from errors import NoCheckoutSupport
58
58
from format import get_rich_root_format
59
59
 
 
60
def generate_ignore_list(ignore_map):
 
61
    """Create a list of ignores, ordered by directory.
 
62
    
 
63
    :param ignore_map: Dictionary with paths as keys, patterns as values.
 
64
    :return: list of ignores
 
65
    """
 
66
    ignores = []
 
67
    keys = ignore_map.keys()
 
68
    keys.sort()
 
69
    for k in keys:
 
70
        ignores.append("./" + os.path.join(k.strip("/"), ignore_map[k].strip("/")))
 
71
    return ignores
 
72
 
 
73
 
60
74
class WorkingTreeInconsistent(BzrError):
61
75
    _fmt = """Working copy is in inconsistent state (%(min_revnum)d:%(max_revnum)d)"""
62
76
 
121
135
                if entry == "":
122
136
                    continue
123
137
 
 
138
                # Ignore ignores on things that aren't directories
124
139
                if entries[entry].kind != svn.core.svn_node_dir:
125
140
                    continue
126
141