~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Martin Pool
  • Date: 2007-08-15 04:33:34 UTC
  • mto: (2701.1.2 remove-should-cache)
  • mto: This revision was merged to the branch mainline in revision 2710.
  • Revision ID: mbp@sourcefrog.net-20070815043334-01dx9emb0vjiy29v
Remove things deprecated in 0.11 and earlier

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    )
35
35
""")
36
36
 
37
 
# compatability - plugins import compare_trees from diff!!!
38
 
# deprecated as of 0.10
39
 
from bzrlib.delta import compare_trees
40
37
from bzrlib.symbol_versioning import (
41
38
        deprecated_function,
42
 
        zero_eight,
43
39
        )
44
40
from bzrlib.trace import mutter, warning
45
41
 
261
257
                        new_abspath, e)
262
258
 
263
259
 
264
 
@deprecated_function(zero_eight)
265
 
def show_diff(b, from_spec, specific_files, external_diff_options=None,
266
 
              revision2=None, output=None, b2=None):
267
 
    """Shortcut for showing the diff to the working tree.
268
 
 
269
 
    Please use show_diff_trees instead.
270
 
 
271
 
    b
272
 
        Branch.
273
 
 
274
 
    revision
275
 
        None for 'basis tree', or otherwise the old revision to compare against.
276
 
    
277
 
    The more general form is show_diff_trees(), where the caller
278
 
    supplies any two trees.
279
 
    """
280
 
    if output is None:
281
 
        output = sys.stdout
282
 
 
283
 
    if from_spec is None:
284
 
        old_tree = b.bzrdir.open_workingtree()
285
 
        if b2 is None:
286
 
            old_tree = old_tree = old_tree.basis_tree()
287
 
    else:
288
 
        old_tree = b.repository.revision_tree(from_spec.in_history(b).rev_id)
289
 
 
290
 
    if revision2 is None:
291
 
        if b2 is None:
292
 
            new_tree = b.bzrdir.open_workingtree()
293
 
        else:
294
 
            new_tree = b2.bzrdir.open_workingtree()
295
 
    else:
296
 
        new_tree = b.repository.revision_tree(revision2.in_history(b).rev_id)
297
 
 
298
 
    return show_diff_trees(old_tree, new_tree, output, specific_files,
299
 
                           external_diff_options)
300
 
 
301
 
 
302
260
def diff_cmd_helper(tree, specific_files, external_diff_options, 
303
261
                    old_revision_spec=None, new_revision_spec=None,
304
262
                    revision_specs=None,