diff-options parser misses '-f', '--forward-ed', & '--context'

Bug #1370435 reported by Richard Wilbur on 2014-09-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
High
Richard Wilbur

Bug Description

In its attempt to default the diff format to 'unified', the parser doesn't recognize '-f', '--forward-ed', or '--context' and thus adds '-u' which diff rightfully complains about--inconsistent format options.

~/src/bzr/bzrlib$ bzr diff --diff-options='-f' -r-2.. diff.py
=== modified file 'bzrlib/diff.py'
diff: conflicting output style options
diff: Try `diff --help' for more information.

bzr: ERROR: external diff failed with exit code 2; command: ['diff', '--label', u'bzrlib/diff.py\t2012-07-24 16:56:07 +0000', '/tmp/bzr-diff-old-uZj_Oh', '--label', u'bzrlib/diff.py\t2014-09-12 11:54:41 +0000', '/tmp/bzr-diff-new-iPdHwh', '--binary', '-u', '-f']

~/src/bzr/bzrlib$ bzr diff --diff-options='--forward-ed' -r-2.. diff.py
=== modified file 'bzrlib/diff.py'
diff: conflicting output style options
diff: Try `diff --help' for more information.

bzr: ERROR: external diff failed with exit code 2; command: ['diff', '--label', u'bzrlib/diff.py\t2012-07-24 16:56:07 +0000', '/tmp/bzr-diff-old-zeyZYH', '--label', u'bzrlib/diff.py\t2014-09-12 11:54:41 +0000', '/tmp/bzr-diff-new-ve__7s', '--binary', '-u', '--forward-ed']

~/src/bzr/bzrlib$ bzr diff --diff-options='--context' -r-2.. diff.py
=== modified file 'bzrlib/diff.py'
diff: conflicting output style options
diff: Try `diff --help' for more information.

bzr: ERROR: external diff failed with exit code 2; command: ['diff', '--label', u'bzrlib/diff.py\t2012-07-24 16:56:07 +0000', '/tmp/bzr-diff-old-pjMoOp', '--label', u'bzrlib/diff.py\t2014-09-12 11:54:41 +0000', '/tmp/bzr-diff-new-v2agmH', '--binary', '-u', '--context']

This is already confirmed by Sebastien Alaiwan on 11 Jun 2014 in his merge request for a branch to address a different diff problem: https://code.launchpad.net/~ace17/bzr/fixDiff4/+merge/222900

Richard Wilbur (richard-wilbur) wrote :
Changed in bzr:
status: In Progress → Fix Committed
Vincent Ladeuil (vila) on 2016-01-21
Changed in bzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers