~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Matthäus G. Chajdas
  • Date: 2010-07-19 18:16:56 UTC
  • mto: (5383.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5384.
  • Revision ID: dev@anteru.net-20100719181656-snkiywdjtpfgtdgh
Allow both --using and --diff-options.

Added an example to the diff documentation to showcase how to use --using and --diff-options. Change the test to use /usr/bin/diff. Update news entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1906
1906
        Same as 'bzr diff' but prefix paths with old/ and new/::
1907
1907
 
1908
1908
            bzr diff --prefix old/:new/
 
1909
            
 
1910
        Show the differences using a custom diff program with options::
 
1911
        
 
1912
            bzr diff --using /usr/bin/diff --diff-options -wu
1909
1913
    """
1910
1914
    _see_also = ['status']
1911
1915
    takes_args = ['file*']
1912
1916
    takes_options = [
1913
1917
        Option('diff-options', type=str,
1914
 
               help='Pass these options to the diff program.'),
 
1918
               help='Pass these options to the external diff program.'),
1915
1919
        Option('prefix', type=str,
1916
1920
               short_name='p',
1917
1921
               help='Set prefixes added to old and new filenames, as '
1958
1962
                '--prefix expects two values separated by a colon'
1959
1963
                ' (eg "old/:new/")')
1960
1964
 
1961
 
        if using is not None and diff_options is not None:
1962
 
            raise errors.BzrCommandError(
1963
 
            '--diff-options and --using are mutually exclusive.')
1964
 
 
1965
1965
        if revision and len(revision) > 2:
1966
1966
            raise errors.BzrCommandError('bzr diff --revision takes exactly'
1967
1967
                                         ' one or two revision specifiers')