Subject: Re: kernel filesystem code move
To: Andrew Brown <atatat@atatdot.net>
From: Eric Haszlakiewicz <erh@nimenees.com>
List: tech-kern
Date: 12/29/2002 16:04:07
--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, Dec 29, 2002 at 03:25:30PM -0500, Andrew Brown wrote:
> people say that "repository copy" should be used so that "history is
> not lost", yet with the requirement of repository copy being that all
> "previous revisions" be marked dead (so that date based checkouts
> "work", ie when you check out the source for a given date, you don't
> get this new file that didn't really exist at that time), the history
> is still lost.  all that is preserved is the log entry, which might be
> interesting, but isn't terribly helpful.
> 
> what if instead of being marked dead, all the "previous revisions" had
> their date changed to the current time.  date based checkouts would
> still work...diffs with previous revisions would still work...
	how about a slightly different marking: "DEAD" vs "dead".  with "DEAD"
meaning consider dead for checkout but not for diff.  CVS hack required, but
only on the server side (I think, it's been a while since I've used this).
Patch attached.

eric

--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="DEAD.patch"

Index: src/diff.c
===================================================================
RCS file: /cvsroot/gnusrc/gnu/dist/cvs/src/diff.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 diff.c
--- src/diff.c	2000/09/04 21:47:02	1.1.1.1
+++ src/diff.c	2002/02/27 17:20:40
@@ -577,6 +577,11 @@
 	else
 	    dead2 = RCS_isdead (vers->srcfile, use_rev2);
 
+	if (dead1 == 2)
+		dead1 = 0;
+	if (dead2 == 2)
+		dead2 = 0;
+
 	if (dead1 && dead2)
 	{
 	    freevers_ts (&vers);
Index: src/rcs.c
===================================================================
RCS file: /cvsroot/gnusrc/gnu/dist/cvs/src/rcs.c,v
retrieving revision 1.6
diff -u -r1.6 rcs.c
--- src/rcs.c	2000/10/26 15:32:19	1.6
+++ src/rcs.c	2002/02/27 17:20:44
@@ -7436,6 +7436,10 @@
     {
 	vnode->dead = 1;
     }
+	if (value != NULL && STREQ (value, "DEAD"))
+	{
+		vnode->dead = 2;
+	}
 
     /* Note that "branches" and "next" are in fact mandatory, according
        to doc/RCSFILES.  */
@@ -7513,9 +7517,12 @@
 	   versions of CVS.  This code should remain indefinately;
 	   there is no procedure for converting old repositories, and
 	   checking for it is harmless.  */
-	if (STREQ (key, RCSDEAD))
+	if (STREQ (key, RCSDEAD) || STREQ(key,"DEAD"))
 	{
-	    vnode->dead = 1;
+		if (STREQ(key,RCSDEAD))
+		    vnode->dead = 1;
+		else
+		    vnode->dead = 2;
 	    if (vnode->state != NULL)
 		free (vnode->state);
 	    vnode->state = xstrdup ("dead");

--CE+1k2dSO48ffgeK--