~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/conflicts.py

Merge from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from bzrlib.errors import BzrCommandError, NotConflicted
31
31
from bzrlib.commands import register_command
32
32
from bzrlib.workingtree import CONFLICT_SUFFIXES
 
33
from bzrlib.osutils import rename
33
34
 
34
35
class cmd_conflicts(bzrlib.commands.Command):
35
36
    """List files with conflicts.
37
38
    files.)
38
39
    """
39
40
    def run(self):
40
 
        for path in Branch.open_containing('.')[0].working_tree().iter_conflicts():
 
41
        for path in Branch.open_containing(u'.')[0].working_tree().iter_conflicts():
41
42
            print path
42
43
 
43
44
class cmd_resolve(bzrlib.commands.Command):
51
52
            if not all:
52
53
                raise BzrCommandError(
53
54
                    "command 'resolve' needs one or more FILE, or --all")
54
 
            tree = Branch.open_containing('.')[0].working_tree()
 
55
            tree = Branch.open_containing(u'.')[0].working_tree()
55
56
            file_list = list(tree.abspath(f) for f in tree.iter_conflicts())
56
57
        else:
57
58
            if all:
80
81
    """
81
82
    conflicted = False
82
83
    try:
83
 
        os.rename(filename + ".THIS", filename)
 
84
        rename(filename + ".THIS", filename)
84
85
        conflicted = True
85
86
    except OSError, e:
86
87
        if e.errno != errno.ENOENT: