[The basic idea of this patch is that supplying the -f option to "cvs get" or "cvs update" means that if the specified tag is not found, CVS will supply the head revision. Without the patch, CVS will set a sticky tag to the nonexistent tag, even though the tag doesn't exist in that file. There are the usual details such as a ChangeLog entry and a sanity.sh testcase. But more importantly, I find myself asking "what is -f for, anyway?" I mean, we document what it does, but why would one use it? This sticky tag behavior would seem to make -f moderately broken, but I don't recall much complaining about this over the years and so I wonder whether -f is lightly used. Between that and my own non-understanding/ignorance about of what -f is good for, I wonder if the -f option should be removed (well, deprecated first I guess) instead of trying to patch it up. I wonder whether it is one of those semi-functional features that death support has, basically, removed the need for. Another conceptual problem, on a more detailed level, is that the patch will leads to sticky tags being set for some files in a directory, but not others. I'm not sure that is worth encouraging; it strikes me as awfully confusing. -kingdon, Nov 1997 OK, a few people have said they use -f. Basically it is another variation of the concept of having some files branched and others shared. See TODO #107 and vendor branches for additional variations on this theme. Or think of the concept, in some multisite concepts, of "I check this into one branch and it gets migrated to the other branch automatically under some circumstances". -kingdon, Aug 1998] Date: Tue, 19 Nov 1996 10:27:37 +0100 From: Heiko Blume To: bug-cvs@prep.ai.mit.edu Subject: Re: 'cvs get -f -r branch_tag mo/dule' hurts 'cvs status' hello some time ago i posted the following problem, which i (hope to) have fixed now. the following patch is rather short, but cures the problem here. however, before i let it loose on the users, does anyone see something wrong about it? that is, i'm not too sure about when the other calls to Register() might get involved in this. regards, hb *** old/cvs-1.8.1/src/update.c Mon May 6 10:40:56 1996 --- new/cvs-1.8.1/src/update.c Mon Nov 18 14:37:12 1996 *************** *** 1072,1078 **** Register (entries, file, resurrecting ? "0" : xvers_ts->vn_rcs, xvers_ts->ts_user, xvers_ts->options, ! xvers_ts->tag, xvers_ts->date, (char *)0); /* Clear conflict flag on fresh checkout */ /* fix up the vers structure, in case it is used by join */ --- 1072,1085 ---- Register (entries, file, resurrecting ? "0" : xvers_ts->vn_rcs, xvers_ts->ts_user, xvers_ts->options, ! /* 199611131 Heiko.Blume@bln.sel.alcatel.de: ! * only write tag info to Entries during 'co -f -r' if ! * the file's tag matches the specified tag ! */ ! ((force_tag_match == 0) ! && (tag != NULL) ! && (RCS_gettag(vers_ts->srcfile, tag, 1, 1) == NULL)) ? NULL : xvers_ts->tag, ! xvers_ts->date, (char *)0); /* Clear conflict flag on fresh checkout */ /* fix up the vers structure, in case it is used by join */ From: blume_h@slbwlz.bln.sel.alcatel.de (H. Blume von Contributed) Newsgroups: comp.software.config-mgmt Subject: 'cvs get -f -r branch_tag mo/dule' hurts 'cvs status' Date: 29 Aug 1996 14:57:05 +0200 hello it seems cvs erroneously adds a tag to non-tagged files in the Entries file when checking out files using -f. manually removing the tag from the Entries file fixes the problem 'cvs status' has with the results of 'cvs get -f -r' as can be seen below. has anybody fixed this already? hb {1022} ~ > cvs get -f -r branch_tag mo/dule cvs checkout: Updating mo/dule U mo/dule/f_31!=32 U mo/dule/f_31=32 {1023} ~ > cd mo/dule/ {1024} ~/mo/dule > ls CVS/ f_31!=32 f_31=32 {1025} ~/mo/dule > cvs status cvs status: Examining . =================================================================== File: f_31!=32 Status: Up-to-date Version: 1.1.2.1 Thu Aug 29 10:44:53 1996 RCS Version: 1.1.2.1 /archive/mo/dule/f_31!=32,v Sticky Tag: branch_tag (revision: 1.1.2.1) Sticky Date: (none) Sticky Options: (none) cvs status: f_31=32 is no longer in the repository =================================================================== File: f_31=32 Status: Entry Invalid Version: 1.2 Thu Aug 29 10:54:41 1996 RCS Version: No revision control file Sticky Tag: branch_tag - MISSING from RCS file! Sticky Date: (none) Sticky Options: (none) {1027} ~/mo/dule > cat CVS/Entries /f_31!=32/1.1.2.1/Thu Aug 29 11:15:03 1996 Thu Aug 29 10:44:53 1996//Tbranch_tag /f_31=32/1.2/Thu Aug 29 11:15:03 1996 Thu Aug 29 10:54:41 1996//Tbranch_tag {1027} ~/mo/dule > vi CVS/Entries [removing tag from line 2 here] {1032} ~/mo/dule > cat CVS/Entries /f_31!=32/1.1.2.1/Thu Aug 29 11:15:03 1996 Thu Aug 29 10:44:53 1996//Tbranch_tag /f_31=32/1.2/Thu Aug 29 11:15:03 1996 Thu Aug 29 10:54:41 1996// {1033} ~/mo/dule > cvs status cvs status: Examining . =================================================================== File: f_31!=32 Status: Up-to-date Version: 1.1.2.1 Thu Aug 29 10:44:53 1996 RCS Version: 1.1.2.1 /archive/mo/dule/f_31!=32,v Sticky Tag: branch_tag (revision: 1.1.2.1) Sticky Date: (none) Sticky Options: (none) =================================================================== File: f_31=32 Status: Up-to-date Version: 1.2 Thu Aug 29 10:54:41 1996 RCS Version: 1.2 /archive/mo/dule/f_31=32,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) --------------------------------------------------------------------------------------