~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/conflicts.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-03-01 02:36:59 UTC
  • mfrom: (1551.2.17 Aaron's small fixes)
  • Revision ID: pqm@pqm.ubuntu.com-20060301023659-bef0c770dffa2805
Fixed conflict commands

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
import errno
27
27
 
28
28
import bzrlib.status
29
 
from bzrlib.branch import Branch
30
29
from bzrlib.errors import BzrCommandError, NotConflicted
31
30
from bzrlib.commands import register_command
32
 
from bzrlib.workingtree import CONFLICT_SUFFIXES
 
31
from bzrlib.workingtree import CONFLICT_SUFFIXES, WorkingTree
33
32
from bzrlib.osutils import rename
34
33
 
35
34
class cmd_conflicts(bzrlib.commands.Command):
38
37
    files.)
39
38
    """
40
39
    def run(self):
41
 
        for path in Branch.open_containing(u'.')[0].working_tree().iter_conflicts():
 
40
        for path in WorkingTree.open_containing(u'.')[0].iter_conflicts():
42
41
            print path
43
42
 
44
43
class cmd_resolve(bzrlib.commands.Command):
52
51
            if not all:
53
52
                raise BzrCommandError(
54
53
                    "command 'resolve' needs one or more FILE, or --all")
55
 
            tree = Branch.open_containing(u'.')[0].working_tree()
 
54
            tree = WorkingTree.open_containing(u'.')[0]
56
55
            file_list = list(tree.abspath(f) for f in tree.iter_conflicts())
57
56
        else:
58
57
            if all: