~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/conflicts.py

  • Committer: Martin Pool
  • Date: 2010-06-02 05:03:31 UTC
  • mto: This revision was merged to the branch mainline in revision 5279.
  • Revision ID: mbp@canonical.com-20100602050331-n2p1qt8hfsahspnv
Correct more sloppy use of the term 'Linux'

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import errno
25
25
 
26
26
from bzrlib import (
 
27
    builtins,
27
28
    cleanup,
28
29
    commands,
29
30
    errors,
58
59
    Use bzr resolve when you have fixed a problem.
59
60
    """
60
61
    takes_options = [
61
 
            'directory',
62
62
            option.Option('text',
63
63
                          help='List paths of files with text conflicts.'),
64
64
        ]
65
65
    _see_also = ['resolve', 'conflict-types']
66
66
 
67
 
    def run(self, text=False, directory=u'.'):
68
 
        wt = workingtree.WorkingTree.open_containing(directory)[0]
 
67
    def run(self, text=False):
 
68
        wt = workingtree.WorkingTree.open_containing(u'.')[0]
69
69
        for conflict in wt.conflicts():
70
70
            if text:
71
71
                if conflict.typestring != 'text conflict':
112
112
    aliases = ['resolved']
113
113
    takes_args = ['file*']
114
114
    takes_options = [
115
 
            'directory',
116
115
            option.Option('all', help='Resolve all conflicts in this tree.'),
117
116
            ResolveActionOption(),
118
117
            ]
119
118
    _see_also = ['conflicts']
120
 
    def run(self, file_list=None, all=False, action=None, directory=u'.'):
 
119
    def run(self, file_list=None, all=False, action=None):
121
120
        if all:
122
121
            if file_list:
123
122
                raise errors.BzrCommandError("If --all is specified,"
124
123
                                             " no FILE may be provided")
125
 
            tree = workingtree.WorkingTree.open_containing(directory)[0]
 
124
            tree = workingtree.WorkingTree.open_containing('.')[0]
126
125
            if action is None:
127
126
                action = 'done'
128
127
        else:
129
 
            tree, file_list = workingtree.WorkingTree.open_containing_paths(
130
 
                file_list)
 
128
            tree, file_list = builtins.tree_files(file_list)
131
129
            if file_list is None:
132
130
                if action is None:
133
131
                    # FIXME: There is a special case here related to the option