/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/conflicts.py

  • Committer: Robert Collins
  • Date: 2010-06-25 20:34:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5324.
  • Revision ID: robertc@robertcollins.net-20100625203405-c74lxd3enklhaqf9
``bzrlib.osutils.get_terminal_encoding`` will now only mutter its
selection when explicitly requested; this avoids many duplicate calls
being logged when helpers, wrappers and older code that manually calls
it are executed it is now logged deliberately by the ui setup code.
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    Use bzr resolve when you have fixed a problem.
60
60
    """
61
61
    takes_options = [
 
62
            'directory',
62
63
            option.Option('text',
63
64
                          help='List paths of files with text conflicts.'),
64
65
        ]
65
66
    _see_also = ['resolve', 'conflict-types']
66
67
 
67
 
    def run(self, text=False):
68
 
        wt = workingtree.WorkingTree.open_containing(u'.')[0]
 
68
    def run(self, text=False, directory=u'.'):
 
69
        wt = workingtree.WorkingTree.open_containing(directory)[0]
69
70
        for conflict in wt.conflicts():
70
71
            if text:
71
72
                if conflict.typestring != 'text conflict':
112
113
    aliases = ['resolved']
113
114
    takes_args = ['file*']
114
115
    takes_options = [
 
116
            'directory',
115
117
            option.Option('all', help='Resolve all conflicts in this tree.'),
116
118
            ResolveActionOption(),
117
119
            ]
118
120
    _see_also = ['conflicts']
119
 
    def run(self, file_list=None, all=False, action=None):
 
121
    def run(self, file_list=None, all=False, action=None, directory=u'.'):
120
122
        if all:
121
123
            if file_list:
122
124
                raise errors.BzrCommandError("If --all is specified,"
123
125
                                             " no FILE may be provided")
124
 
            tree = workingtree.WorkingTree.open_containing('.')[0]
 
126
            tree = workingtree.WorkingTree.open_containing(directory)[0]
125
127
            if action is None:
126
128
                action = 'done'
127
129
        else: