~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2005-10-06 22:15:52 UTC
  • mfrom: (1185.13.2)
  • mto: This revision was merged to the branch mainline in revision 1420.
  • Revision ID: robertc@robertcollins.net-20051006221552-9b15c96fa504e0ad
mergeĀ fromĀ upstream

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)]