~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-11-05 08:35:39 UTC
  • mfrom: (5521.1.2 670851-directory-and-files)
  • Revision ID: pqm@pqm.ubuntu.com-20101105083539-urkk2to9qakthagn
(vila) Respect --directory when path parameters are also used for shelve and
 restore (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
 
155
155
    @classmethod
156
156
    def from_args(klass, diff_writer, revision=None, all=False, file_list=None,
157
 
                  message=None, directory='.', destroy=False):
 
157
                  message=None, directory=None, destroy=False):
158
158
        """Create a shelver from commandline arguments.
159
159
 
160
160
        The returned shelver wil have a work_tree that is locked and should
168
168
        :param destroy: Change the working tree without storing the shelved
169
169
            changes.
170
170
        """
 
171
        if directory is None:
 
172
            directory = u'.'
 
173
        elif file_list:
 
174
            file_list = [osutils.pathjoin(directory, f) for f in file_list]
171
175
        tree, path = workingtree.WorkingTree.open_containing(directory)
172
176
        # Ensure that tree is locked for the lifetime of target_tree, as
173
177
        # target tree may be reading from the same dirstate.