~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

Merge Aarons conflict plugin for 0.1rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
            if not self.is_ignored(subp):
276
276
                yield subp
277
277
 
 
278
    def iter_conflicts(self):
 
279
        conflicted = set()
 
280
        for path in (s[0] for s in self.list_files()):
 
281
            stem = get_conflicted_stem(path)
 
282
            if stem is None:
 
283
                continue
 
284
            if stem not in conflicted:
 
285
                conflicted.add(stem)
 
286
                yield stem
278
287
 
279
288
    def extras(self):
280
289
        """Yield all unknown files in this WorkingTree.
366
375
                    return pat
367
376
        else:
368
377
            return None
369
 
        
 
378
 
 
379
CONFLICT_SUFFIXES = ('.THIS', '.BASE', '.OTHER')
 
380
def get_conflicted_stem(path):
 
381
    for suffix in CONFLICT_SUFFIXES:
 
382
        if path.endswith(suffix):
 
383
            return path[:-len(suffix)]