/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: Martin Pool
  • Date: 2007-08-16 01:02:17 UTC
  • mfrom: (2696.1.2 remove-deprecated)
  • mto: This revision was merged to the branch mainline in revision 2712.
  • Revision ID: mbp@sourcefrog.net-20070816010217-oja4sj0bsjsnrbkv
Merge removal of deprecations

Show diffs side-by-side

added added

removed removed

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