~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/conflicts.py

  • Committer: Vincent Ladeuil
  • Date: 2010-11-04 17:48:47 UTC
  • mto: This revision was merged to the branch mainline in revision 5523.
  • Revision ID: v.ladeuil+lp@free.fr-20101104174847-x3io00xsknnikaka
Handle --directory when paths are also provided to shelve and restore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
            ResolveActionOption(),
118
118
            ]
119
119
    _see_also = ['conflicts']
120
 
    def run(self, file_list=None, all=False, action=None, directory=u'.'):
 
120
    def run(self, file_list=None, all=False, action=None, directory=None):
121
121
        if all:
122
122
            if file_list:
123
123
                raise errors.BzrCommandError("If --all is specified,"
124
124
                                             " no FILE may be provided")
 
125
            if directory is None:
 
126
                directory = u'.'
125
127
            tree = workingtree.WorkingTree.open_containing(directory)[0]
126
128
            if action is None:
127
129
                action = 'done'
128
130
        else:
129
131
            tree, file_list = workingtree.WorkingTree.open_containing_paths(
130
 
                file_list)
 
132
                file_list, directory)
131
133
            if file_list is None:
132
134
                if action is None:
133
135
                    # FIXME: There is a special case here related to the option