~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-27 15:01:46 UTC
  • mfrom: (3123.6.3 no-inventory2)
  • Revision ID: pqm@pqm.ubuntu.com-20071227150146-08nqv2gvo5e3i1n3
Implement native support for --using (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1454
1454
 
1455
1455
            bzr diff --prefix old/:new/
1456
1456
    """
1457
 
    # TODO: Option to use external diff command; could be GNU diff, wdiff,
1458
 
    #       or a graphical diff.
1459
 
 
1460
 
    # TODO: Python difflib is not exactly the same as unidiff; should
1461
 
    #       either fix it up or prefer to use an external diff.
1462
 
 
1463
 
    # TODO: Selected-file diff is inefficient and doesn't show you
1464
 
    #       deleted files.
1465
 
 
1466
 
    # TODO: This probably handles non-Unix newlines poorly.
1467
 
 
1468
1457
    _see_also = ['status']
1469
1458
    takes_args = ['file*']
1470
1459
    takes_options = [
1484
1473
            ),
1485
1474
        'revision',
1486
1475
        'change',
 
1476
        Option('using',
 
1477
            help='Use this command to compare files.',
 
1478
            type=unicode,
 
1479
            ),
1487
1480
        ]
1488
1481
    aliases = ['di', 'dif']
1489
1482
    encoding_type = 'exact'
1490
1483
 
1491
1484
    @display_command
1492
1485
    def run(self, revision=None, file_list=None, diff_options=None,
1493
 
            prefix=None, old=None, new=None):
 
1486
            prefix=None, old=None, new=None, using=None):
1494
1487
        from bzrlib.diff import _get_trees_to_diff, show_diff_trees
1495
1488
 
1496
1489
        if (prefix is None) or (prefix == '0'):
1517
1510
                               specific_files=specific_files,
1518
1511
                               external_diff_options=diff_options,
1519
1512
                               old_label=old_label, new_label=new_label,
1520
 
                               extra_trees=extra_trees)
 
1513
                               extra_trees=extra_trees, using=using)
1521
1514
 
1522
1515
 
1523
1516
class cmd_deleted(Command):