/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

Merge cleanup into texinfo

Show diffs side-by-side

added added

removed removed

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