[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS and -d updating CVS/Root (or not)



Hmm. This is more than likely a think-o on my part, but I have recently
been starting with an un-tarred CVS tree and the updating using:

	cvs -d anoncvs_(_at_)_anoncvs_(_dot_)_uk_(_dot_)_openbsd_(_dot_)_org:/cvs update -PAd

Which happily updated everything except the CVS/Root files in the
individual directories. New directories get them, but old ones do
not.

Now reading the docs explicity says that using the '-d' option will
update CVS/Root for you. Not for me it doesn't. The only environment
variable prefixed by CVS that I have set is CVS_RSH - nothing else.

Looking at the code in cvs/main.c (1.32 -current) at about line 718
onwards, there is the logic that may or may not set "need_to_create_root",
but the code can never be got to because of the code that goes:

  CVSADM_Root = NULL;

  ...

  if (lookup_command_attribute (command_name)
      & CVS_CMD_IGNORE_ADMROOT)
  {
    CVSADM_Root = Name_Root((char *) NULL, (char *) NULL);
  }

  if (CVSADM_Root != NULL)
  {
    ...

Now, I read this to say that if the command is *not* "cvs import" then
the first "if" will fail, and CVSADM_Root will always be NULL, and the
inner code never gets run. Should the first test be inverted ?

I dunno enough about the CVS code to go any further without doing it
plainly wrong - so any ideas folks ?

Regards,
-- 
Peter Galbavy
Knowledge Matters Ltd
http://www.knowledge.com /http://www.wonderland.org/ http://www.literature.org/


Visit your host, monkey.org