~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/conflicts.py

  • Committer: Vincent Ladeuil
  • Date: 2010-06-17 09:23:19 UTC
  • mfrom: (5301 +trunk)
  • mto: (5247.1.8 first-try)
  • mto: This revision was merged to the branch mainline in revision 5326.
  • Revision ID: v.ladeuil+lp@free.fr-20100617092319-da2bzdtf3j0voynf
Merge bzr.dev into cleanup

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: