[this patch looks plausible to me, but I haven't looked carefully -kingdon] From: "Cameron, Steve" To: "'bug-cvs@prep.ai.mit.edu'" Subject: Patch for "cvs update -d -j rev1 -j rev2...", branch-to-branch merge not setting sticky tags right Date: Mon, 8 Dec 1997 15:07:22 -0600 [contents of this version snipped, as they seem to be superceded by the 18 Feb 1998 one below -kingdon] Return-Path: From: "Cameron, Steve" To: "'info-cvs@gnu.org'" Subject: Patch to fix "cvs update -d" local CVS only, not Client/server CVS. Date: Wed, 18 Feb 1998 11:12:43 -0600 Here's an update of a patch that's on Cyclic's unofficial patches web page having to do with cvs update -d -j. This new patch corrects in addition a problem with "cvs update -d" not getting tags right when there are multiple tags required for multiple new directories. I can't make guarantees of correctness of course. It does pass sanity.sh, and the code is not even executed with remote CVS. Remote CVS still exhibits the problems this patch corrects in local CVS. Example of problem: % cvs checkout -r a_tag a_module % cd a_module % /bin/rm dir1 dir2 % cvs update -d -r tag1 dir1 % cvs update -d -r tag2 dir2 % /bin/rm -fr dir1/subdira dir2/subdirb % cvs update -d dir1 dir2 dir1/subdira and dir2/subdirb should be restored with tags tag1 and tag2 respectively, but they aren't. I would be grateful if anyone can give me hints on how I might accomplish a fix for the same problem for client/server CVS. I'm not sure if the "-D" (for dates) option works quite right with this code. I have a feeling it doesn't, but also I have a feeling neither did the original code, since it would be using the wrong tag. (what if you do "cvs update -d -r tag_1 -D '02/07/1998' dir1", should it get a sticky date tag? it doesn;'t. It does appear (though I haven't looked carefully) to pull the right revisions though.) Thanks, -- Steve Cameron P.S. This patch applies to update.c from CVS 1.9 > > > >*** update.c.orig Thu Dec 4 13:32:56 1997 >--- update.c Tue Feb 17 17:03:53 1998 >*************** >*** 740,748 **** > } > else > { > /* otherwise, create the dir and appropriate adm files */ > make_directory (dir); >! Create_Admin (dir, update_dir, repository, tag, date); > Subdir_Register (entries, (char *) NULL, dir); > } > } >--- 746,771 ---- > } > else > { >+ char *mytag = (char *) NULL; >+ char *mydate = (char *) NULL; >+ > /* otherwise, create the dir and appropriate adm files */ >+ > make_directory (dir); >! >! if ((join_rev1 != (char *) NULL || tag == (char *) NULL) >! && !aflag) >! { >! ParseTag(&mytag,&mydate); >! Create_Admin (dir, update_dir, repository, mytag, mydate); >! if (mytag != (char *) NULL) free(mytag); >! if (mydate != (char *) NULL) free(mydate); >! } >! else >! { >! Create_Admin (dir, update_dir, repository, tag, date); >! } >! > Subdir_Register (entries, (char *) NULL, dir); > } > } > > >