~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-19 08:31:08 UTC
  • mfrom: (1666.1.5 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060419083108-fab2970f4575b010
Change the default branch format to be metadir. (Robert Collins, Aaron Bentley).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1197
1197
            new_conflicts.add((c_type, 'Versioned directory', conflict[1]))
1198
1198
    return new_conflicts
1199
1199
 
 
1200
 
1200
1201
def cook_conflicts(raw_conflicts, tt):
1201
1202
    """Generate a list of cooked conflicts, sorted by file path"""
1202
 
    def key(conflict):
1203
 
        if conflict.path is not None:
1204
 
            return conflict.path, conflict.typestring
1205
 
        elif getattr(conflict, "conflict_path", None) is not None:
1206
 
            return conflict.conflict_path, conflict.typestring
1207
 
        else:
1208
 
            return None, conflict.typestring
 
1203
    from bzrlib.conflicts import Conflict
 
1204
    conflict_iter = iter_cook_conflicts(raw_conflicts, tt)
 
1205
    return sorted(conflict_iter, key=Conflict.sort_key)
1209
1206
 
1210
 
    return sorted(list(iter_cook_conflicts(raw_conflicts, tt)), key=key)
1211
1207
 
1212
1208
def iter_cook_conflicts(raw_conflicts, tt):
1213
1209
    from bzrlib.conflicts import Conflict