292
293
def get_trees_and_branches_to_diff(path_list, revision_specs, old_url, new_url,
293
add_cleanup, apply_view=True):
295
"""Get the trees and specific files to diff given a list of paths.
297
This method works out the trees to be diff'ed and the files of
298
interest within those trees.
301
the list of arguments passed to the diff command
302
:param revision_specs:
303
Zero, one or two RevisionSpecs from the diff command line,
304
saying what revisions to compare.
306
The url of the old branch or tree. If None, the tree to use is
307
taken from the first path, if any, or the current working tree.
309
The url of the new branch or tree. If None, the tree to use is
310
taken from the first path, if any, or the current working tree.
312
if True and a view is set, apply the view or check that the paths
315
a tuple of (old_tree, new_tree, old_branch, new_branch,
316
specific_files, extra_trees) where extra_trees is a sequence of
317
additional trees to search in for file-ids. The trees and branches
320
op = cleanup.OperationWithCleanups(get_trees_and_branches_to_diff_locked)
321
return op.run_simple(path_list, revision_specs, old_url, new_url,
322
op.add_cleanup, apply_view=apply_view)
324
def get_trees_and_branches_to_diff_locked(
325
path_list, revision_specs, old_url, new_url, add_cleanup, apply_view=True):
294
326
"""Get the trees and specific files to diff given a list of paths.
296
328
This method works out the trees to be diff'ed and the files of