~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Aaron Bentley
  • Date: 2005-10-06 04:29:10 UTC
  • mfrom: (1185.14.11)
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1419.
  • Revision ID: aaron.bentley@utoronto.ca-20051006042910-a3263271389bfdc2
Merged conflict handling work

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