[The -K option is a good idea in general terms; at least OpenBSD has a similar patch. Seems to me that this kind of thing belongs in CVSROOT/config rather than as an option. As for Header0 and Header1, I don't know. I'd want to think more about variations on that theme, and see whether it seems like a creeping feature to others, before I expressed much of an opinion. Probably easier to consider the two issues separately (as suggested in HACKING). -kingdon] Date: Thu, 13 May 1999 07:05:02 -0400 (EDT) From: Rik Faith To: bug-cvs@gnu.org Subject: CVS 1.10.5 patch to extend keywords X-Url: http://www.precisioninsight.com/ I'd like to submit the following patch for your consideration. ChangeLog entry: ====================================================================== 1999-03-15 Rik Faith * Add two new keywords, Header0 and Header1. Header0 is just like Header, except the name of the repository is stripped from the path. Header1 is just like Header, except the name of the repository and the name of the module is stripped from the path. * Add the global -K option to add a new keyword at run time. Syntax: -Kknown,new Function: Makes $new$ act like $known$ ====================================================================== As free software projects become larger, make greater use of public CVS repositories, and start to share larger pieces of code, the desire to simultaneously track version numbers from multiple repositories will grow. These patches address this need by allowing private keywords to track local CVS versions and to preserve this version information when the changes are merged into another CVS repository. For example, we do work in several repositories: our private PI repository and several public repositories. We'd like to be able to tag our files using keywords that are not changed when our changes are merged into another repository. So, in our files, we might use: $Id: dev-keywords.txt,v 1.1.1.1 2001/04/14 00:10:26 dprice Exp $ $OtherRepository$ $PI$ When we do work in our private repository, we use cvs -KHeader1,PI which updates $PI$ using a header format that is compatible with that used by the other repository (they don't care what our CVS repository path is or what our module name is, but they do care where the file is stored in the source tree -- hence, the use of Header1 instead of Header). When we submit our changes to OtherRepository, they might use: cvs -KHeader1,OtherRepository to merge in the changes, thereby updating $OtherRepository$ but leaving $PI$ unchanged. These patches are backward compatible with remote versions of CVS that do not support the NewKeyword protocol request -- you just can't use the -K option when talking to older versions of the CVS server. And, of course, your new keywords won't get changed when talking with an older CVS. This isn't a problem because the new keywords are most useful in private repositories -- older versions of CVS will successfully ignore them. Thanks, Rik Faith (faith@precisioninsight.com, nee faith@cs.unc.edu) [P.S. If this patch is accepted, I'll be happy to write a NEWS entry, modify cvs.texinfo, and take a look at developing a test case.] begin 660 cvs-1.10.5.patch M9&EF9B`M=7(@8W9S+3$N,3`N-2YO7=OPHK"6EN="`@("`@("`@:&%V95]N M97=K97EW;W)D(#T@7=O7=O M7=O'1R82!N971W;W)K"B`@("`@ M("`@='5R;F%R;W5N9"!F;W(@8W9S(&EM<&]R="!S965M')E861L:6YK(%!23U1/*"AC;VYS="!C:&%R("IL:6YK*2D[ M"B!C:&%R("IL87-T7V-O;7!O;F5N="!04D]43R@H8VAA'-T2AT;7`K:&5A9&QE;BUA;&5N+3$L('!T M*3L**PD@("`@<&%T:&QE;B`M/2!A;&5N("L@,3L**PD@("`@=&]F'-T2!T:&ES(&9U;F-T:6]N(&]R(&ET&$B+"!L;VYG7V]P=&EO M;G,L("9O<'1I;VY?:6YD97@I*0HK("`@("`@("`@("`@*&%R9V,L(&%R9W8L M("(K47%R=W1N;'9B.E0Z93ID.DA+.F9Z.G,Z>&$B+"!L;VYG7V]P=&EO;G,L M("9O<'1I;VY?:6YD97@I*0H@("`@("`@("`@("`A/2!%3T8I"B`@("`@>PH@ M"7-W:71C:"`H8RD*0$`@+34Y-2PV("LU.38L.2!`0`H@"0EB7=O2P@7=OR!+15E73U)$7TE.250@*")!=71H;W(B*2!]+`HM("`@ M('L@2T595T]21%])3DE4("@B1&%T92(I('TL"BT@("`@>R!+15E73U)$7TE. M250@*")(96%D97(B*2!]+`HM("`@('L@2T595T]21%])3DE4("@B260B*2!] M+`HM("`@('L@2T595T]21%])3DE4("@B3&]C:V5R(BD@?2P*+2`@("![($M% M65=/4D1?24Y)5"`H(DQO9R(I('TL"BT@("`@>R!+15E73U)$7TE.250@*"). M86UE(BD@?2P*+2`@("![($M%65=/4D1?24Y)5"`H(E)#4V9I;&4B*2!]+`HM M("`@('L@2T595T]21%])3DE4("@B4F5V:7-I;VXB*2!]+`HM("`@('L@2T59 M5T]21%])3DE4("@B4V]UPH@("`@($M%65=/4D1?05542$]2(#T@,"P*0$`@+3,W,C(L."`K,S

7!E.PHK?3L**R-D969I;F4@2T595T]2 M1%]-05@@-C0**R-D969I;F4@2T595T]21%])3DE4*',I("AS*2P@R!+15E73U)$7TE.250@ M*")$871E(BDL("`@("!+15E73U)$7T1!5$4@?2P**R`@("![($M%65=/4D1? M24Y)5"`H(DAE861ER!+ M15E73U)$7TE.250@*"))9"(I+"`@("`@("!+15E73U)$7TE$('TL"BL@("`@ M>R!+15E73U)$7TE.250@*"),;V-K97(B*2P@("!+15E73U)$7TQ/0TM%4B!] M+`HK("`@('L@2T595T]21%])3DE4("@B3&]G(BDL("`@("`@2T595T]21%], M3T<@?2P**R`@("![($M%65=/4D1?24Y)5"`H(DYA;64B*2P@("`@($M%65=/ M4D1?3D%-12!]+`HK("`@('L@2T595T]21%])3DE4("@B4D-39FEL92(I+"`@ M2T595T]21%]20U-&24Q%('TL"BL@("`@>R!+15E73U)$7TE.250@*")2979I MR!+15E73U)$7TE. M250@*")3;W5R8V4B*2P@("!+15E73U)$7U-/55)#12!]+`HK("`@('L@2T59 M5T]21%])3DE4("@B4W1A=&4B*2P@("`@2T595T]21%]35$%412!]+`HK("`@ M('L@2T595T]21%])3DE4("@B2&5A9&5R,"(I+"`@2T595T]21%](14%$15(P M('TL"BL@("`@>R!+15E73U)$7TE.250@*")(96%D97(Q(BDL("!+15E73U)$ M7TA%041%4C$@?2P**R`@("![($Y53$PL(#`@?0H@?3L**W-T871I8R!I;G0@ M;F5W:V5Y=V]R9%]S=&%R="`](#`["BMS=&%T:6,@:6YT(&YE=VME>7=O2P@;F5W:V5Y=V]R9"D**R`@("!C:&%R("IS:6UI;&%R:71Y M.PHK("`@(&-H87(@*FYE=VME>7=O7!E("HO"BL@("`@:6YT("`@("`@("`@("`@("`@(&D[ M"BL@("`@:6YT("`@("`@("`@("`@("`@('-I;6QE;B`]('-T7=O M7=O7=O7=OPHK"6EF("@K*VYE=VME>7=O'-T7=O7=O7=O7!E("`@/2!K=SL**R-I M9B`P"BL@("`@9G!R:6YT9BAS=&1E2P@;F5W:V5Y=V]R M9"P@:W7=O7=O M7=O3L**R`@("!C:&%R("IN M97=K97EW;W)D.PHK("`@(&EN="`@'-T2P@;F5W:V5Y=V]R9"D["BL)9G)E92AT;7`I.PHK("`@('T**R`@("!R M971U"P@2P@;F5W:V5Y=V]R9"D**R`@("!I;G0@:61X.PHK M("`@(&-O;G-T(&-H87(@*BIS:6UI;&%R:71Y.PHK("`@(&-O;G-T(&-H87(@ M*BIN97=K97EW;W)D.PHK>PHK("`@(&EN="!O9F9S970["BL**R`@("!I9B`H M(6YE=VME>7=O7=O2`] M(&ME>7=O7=O7=O'1E M'0L"BL)"2`@("`@(D4@4')O=&]C;VP@97)R M;W(Z(&)A9"!N97=K97EW;W)D(&]P=&EO;B`EPI`0"`M-#0X-2PV("LT-3`R+#<@ M0$`*("`@4D517TQ)3D4H(D%R9W5M96YT(BP@