adding on branch

"Paul Edwards" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.bugs
Organization BigPond Internet Services (http://www.bigpond.net.au)
Message-ID <[email protected]>
What is the logic behind the fact that when you have a project
checked out on a branch, and then you go:

cvs add filename.c
cvs commit -m "." filename.c

it gets put into the Attic directory instead of the normal directory?

Is this because a checkout on the "head" would otherwise pick
up this branch "automatically"/"accidentally"?

But when a subsequent "cvs add" is done, not on a branch, then
it is taken out of the Attic (but unfortunately Attic is not removed -
perhaps this code is what is required to do that?).

Index: rcs.c
===================================================================
RCS file: /cvs/ccvs/src/rcs.c,v
retrieving revision 1.262
diff -c -r1.262 rcs.c
*** rcs.c 3 Jan 2003 04:24:10 -0000 1.262
--- rcs.c 25 May 2003 07:47:15 -0000
***************
*** 700,705 ****
--- 700,707 ----
       free (newpath);
       return 1;
   }
+  *p = '\0';
+  rmdir (rcs->path);
      }

      free (rcs->path);


Ok, but an import is another way of adding a "head" version.
So the import should also go through the same logic, moving a
file out of the Attic and putting it into the normal spot, and
(hopefully) also removing the Attic directory.

Is something like this the right place...

Index: import.c
===================================================================
RCS file: /cvs/ccvs/src/import.c,v
retrieving revision 1.133
diff -c -r1.133 import.c
*** import.c 24 Sep 2002 20:10:38 -0000 1.133
--- import.c 25 May 2003 08:02:31 -0000
***************
*** 694,699 ****
--- 694,704 ----
   letter = 'U';
      add_log (letter, vfile);

+     if (inattic)
+     {
+         RCS_setattic(vers->srcfile, 0);
+     }
+
      freevers_ts (&vers);
      return (0);
  }

All diffs against cvs1-11-5.

BFN.  Paul.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.