Package: rcs Version: 5.7-16 Severity: normal
Providing the rcsdiff command with a revision number and a symbolic name for the same revision creates different error results depending on whether the option is a long option or is either of the short options "-DNAME" or "-Y". Here is a recreation of the bug: $ echo '$Name$' > filename $ ci -t-filename -nFOO filename filename,v <-- filename initial revision: 1.1 done $ rcsdiff -r1.1 -rFOO -u filename =================================================================== RCS file: filename,v $ rcsdiff -r1.1 -rFOO --unified filename =================================================================== RCS file: filename,v retrieving revision 1.1 retrieving revision 1.1 diff --unified -r1.1 -r1.1 --- filename 2005/10/14 21:51:59 1.1 +++ filename 2005/10/14 21:51:59 1.1 @@ -1 +1 @@ -$Name: $ +$Name: FOO $ A potential patch that fixes the behavior is attached. It deletes all instances of a flag variable named `no_diff_means_no_output'. It's not clear what its purpose is. Here is the result of the patched rcsdiff: $ rcsdiff -r1.1 -rFOO -u filename =================================================================== RCS file: filename,v $ rcsdiff -r1.1 -rFOO --unified filename =================================================================== RCS file: filename,v Thanks for maintaining RCS, Romain. /a -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.2.20 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages rcs depends on: ii libc6 2.3.5-6 GNU C Library: Shared libraries an rcs recommends no packages. -- no debconf information *** /home/ashawley/patches/rcsdiff.c-name-bug.diff --- rcsdiff.c 2005/10/14 20:35:53 1.1 +++ rcsdiff.c 2005/10/14 21:03:58 @@ -178,7 +178,6 @@ struct hshentries *gendeltas; /* deltas to be generated */ struct hshentry * target; char *a, *dcp, **newargv; - int no_diff_means_no_output; register c; exitstatus = DIFF_SUCCESS; @@ -191,7 +190,6 @@ file_labels = 0; #endif expandarg = suffixarg = versionarg = zonearg = 0; - no_diff_means_no_output = true; suffixes = X_DEFAULT; /* @@ -215,8 +213,6 @@ } goto option_handled; case '-': case 'D': - no_diff_means_no_output = false; - /* fall into */ case 'C': case 'F': case 'I': case 'L': case 'W': #if DIFF_L if (c == 'L' && ++file_labels == 2) @@ -235,8 +231,6 @@ } break; case 'y': - no_diff_means_no_output = false; - /* fall into */ case 'B': case 'H': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': @@ -356,7 +350,7 @@ continue; if (!(target=genrevs(numericrev.string,(char *)0,(char *)0,(char *)0,&gendeltas))) continue; xrev2=target->num; - if (no_diff_means_no_output && xrev1 == xrev2) + if (xrev1 == xrev2) continue; } else if ( target->lockedby -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]