Bug 165071 - rcsdiff fails to pass '-U NUM' parameter to diff.
Summary: rcsdiff fails to pass '-U NUM' parameter to diff.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rcs
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-04 03:07 UTC by Ignacio G.
Modified: 2015-03-05 01:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-10 13:15:20 UTC
Type: ---
Embargoed:
wtogami: fedora-cvs+


Attachments (Terms of Use)

Description Ignacio G. 2005-08-04 03:07:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)

Description of problem:
When trying to use the context size option for the unified diffs, rcsdiff fails to pass the proper option to diff:

$ rcsdiff -u1 beer.cfg
===================================================================
RCS file: RCS/beer.cfg,v
retrieving revision 1.2
diff -u1 -r1.2 beer.cfg
/usr/bin/diff: `-1' option is obsolete; use `-U 1'
/usr/bin/diff: Try `/usr/bin/diff --help' for more information.
rcsdiff: beer.cfg: diff failed
$
$ rcsdiff -u -U1 beer.cfg
rcsdiff: unknown option: -U1
rcsdiff usage: rcsdiff -ksubst -q -rrev1 [-rrev2] -Vn -xsuff -zzone [diff options] file ...
$ rcsdiff -u -U 1 beer.cfg
rcsdiff: unknown option: -U
rcsdiff usage: rcsdiff -ksubst -q -rrev1 [-rrev2] -Vn -xsuff -zzone [diff options] file ...
$ rcsdiff -U 1 beer.cfg
rcsdiff: unknown option: -U
rcsdiff usage: rcsdiff -ksubst -q -rrev1 [-rrev2] -Vn -xsuff -zzone [diff options] file ...
$

It seems rcsdiff and diff are not in sync as to what are valid diff options.

Version-Release number of selected component (if applicable):
rcs-5.7-26, diffutils-2.8.1-12

How reproducible:
Always

Steps to Reproduce:
See above for sample commands. This command should work:
$ rcsdiff -U 1 file
but it doesn't.


Actual Results:  rcsdiff fails with an error message.

Expected Results:  rcsdiff should display the diffs as unidiff with a context of 1 line.

Note that there is no workaround because diff changed its set of valid options: '-u NUM' used to be valid and equivalent to '-U NUM' but not anymore.


Additional info:

BTW, this could also be partly to blame on 'diff' which should still take '-u NUM'.

Comment 1 Phil Knirsch 2005-10-10 13:15:20 UTC
I've just 'fixed' rcsdiff to support the new -U option as a diff option for it's
arguments.

The old style -u1 won't work anymore, of course, but at least

rcsdiff -U 1 file

works now properly as expected.

Fix is in latest rcs package which should hit development trees in a few days.

Read ya, Phil

Comment 2 Jiri Moskovcak 2007-07-09 13:06:32 UTC
Package Change Request
======================
Package Name: rcs
Updated Fedora Owners: jmoskovc


Note You need to log in before you can comment on or make changes to this bug.