/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Andrew Bennetts
  • Date: 2010-04-13 13:16:16 UTC
  • mto: This revision was merged to the branch mainline in revision 5152.
  • Revision ID: andrew.bennetts@canonical.com-20100413131616-66dgnztkl9a1be60
Add get_trees_and_branches_to_diff_locked, leave get_trees_and_branches_to_diff unchanged for qbzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    branch as _mod_branch,
33
33
    bzrdir,
34
34
    cmdline,
 
35
    cleanup,
35
36
    errors,
36
37
    osutils,
37
38
    patiencediff,
290
291
 
291
292
 
292
293
def get_trees_and_branches_to_diff(path_list, revision_specs, old_url, new_url,
293
 
                                   add_cleanup, apply_view=True):
 
294
                                   apply_view=True):
 
295
    """Get the trees and specific files to diff given a list of paths.
 
296
 
 
297
    This method works out the trees to be diff'ed and the files of
 
298
    interest within those trees.
 
299
 
 
300
    :param path_list:
 
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.
 
305
    :param old_url:
 
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.
 
308
    :param new_url:
 
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.
 
311
    :param apply_view:
 
312
        if True and a view is set, apply the view or check that the paths
 
313
        are within it
 
314
    :returns:
 
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
 
318
        are not locked.
 
319
    """
 
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)
 
323
    
 
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.
295
327
 
296
328
    This method works out the trees to be diff'ed and the files of