179
177
tree, path = workingtree.WorkingTree.open_containing(directory)
180
178
# Ensure that tree is locked for the lifetime of target_tree, as
181
179
# target tree may be reading from the same dirstate.
184
181
target_tree = builtins._get_one_revision_tree('shelf2', revision,
186
183
files = tree.safe_relpath_files(file_list)
187
184
return klass(tree, target_tree, diff_writer, all, all, files,
193
188
"""Interactively shelve the changes."""