bugGNU RCS - Bugs: bug #67093, rcs log -l not filtering based on...

 
 

bug #67093: rcs log -l not filtering based on username

Submitter:  None
Submitted:  Tue 06 May 2025 08:40:19 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 07 May 2025 04:49:46 PM UTC, comment #2: 

Ah, this was patched in RHEL/CentOS build of RCS but the patch failed to be filtered back upstream https://bugzilla.redhat.com/show_bug.cgi?id=1696716

The fix appears to be straightforward


::::::::::::::
rpmbuild/SOURCES/rcs-5.9-rlog_fix_locks.patch
::::::::::::::
diff -up rcs-5.9.0/src/rlog.c.fix_locks rcs-5.9.0/src/rlog.c
--- rcs-5.9.0/src/rlog.c.fix_locks        2019-04-24 18:24:50.631189377 +0200
+++ rcs-5.9.0/src/rlog.c        2019-04-24 18:25:03.060364074 +0200
@@ -894,7 +894,6 @@ rlog_main (const char *cmd, int argc, ch
         repo_filename = REPO (filename);
         tip = REPO (tip);
         defbr = GROK (branch);
-        locks = GROK (locks);
         strictly_locking = BE (strictly_locking);
         kws = BE (kws);

@@ -902,6 +901,8 @@ rlog_main (const char *cmd, int argc, ch
         if (lockflag)
           trunclocks (&criteria);

+        locks = GROK (locks);
+
         /* Do nothing if ā€˜-L’ is given and there are no locks.  */
         if (onlylockflag && !locks)
           continue;


Anonymous
Tue 06 May 2025 10:04:24 PM UTC, comment #1: 

I maybe wrong where the bug was introduced, I was going to down-rev but my testing doesn't show expected behavior in RCS 5.9.4, 5.8.2 or 5.8.1 and only RCS 5.7 shows what I expect.


[mtinberg@build9 rcs-test]$ ~/src/rcs-5.8.1/src/rlog -L -R -wmtinberg *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v
[mtinberg@build9 rcs-test]$ ~/src/rcs-5.8.1/src/rlog -L -R -lmtinberg *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v
[mtinberg@build9 rcs-test]$ ~/src/rcs-5.7/src/rlog -L -R -lmtinberg *,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v
[mtinberg@build9 rcs-test]$ ~/src/rcs-5.7/src/rlog -L -R -wmtinberg *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v


Anonymous
Tue 06 May 2025 08:40:19 PM UTC, original submission:  

I believe there is a bug in RCS introduced in or around

https://git.savannah.gnu.org/cgit/rcs.git/commit/?h=p&id=974055f1348d12bca0294ae5eca4d079ac00f2cd

in the handling of -l CLI option to `rcs log` which should show only files locked by the specified user, but instead shows all locked files regardless of the specified user.

Example test case:


[mtinberg RCS 5.10 rcs-test]$ rcs log -L -R -wmtinberg *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v
[mtinberg RCS 5.10 rcs-test]$ rcs log -L -R -wmtinberg *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v
[mtinberg RCS 5.10 rcs-test]$ rcs log -L -R -lmtinberg *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v
[mtinberg RCS 5.10 rcs-test]$ rcs log -L -R -lbbadger *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v
[mtinberg RCS 5.10 rcs-test]$ rcs log -L -R -wbbadger *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v


vs.


[mtinberg RCS 5.9 rcs-test]$ rcs log -L -R -wmtinberg *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v
[mtinberg RCS 5.9 rcs-test]$ rcs log -L -R -lmtinberg *,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v
[mtinberg RCS 5.9 rcs-test]$ rcs log -L -R -lbbadger *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
[mtinberg RCS 5.9 rcs-test]$ rcs log -L -R -wbbadger *,v
test-locked-bbadger-author-bbadger,v
test-locked-bbadger-author-mtinberg,v
test-locked-mtinberg-author-bbadger,v
test-locked-mtinberg-author-mtinberg,v


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.15-e6e5.
Corresponding source code