info-cvs
[Top][All Lists]
Advanced

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

Re: Question about commits in CVSROOT and running loginfo scripts


From: Noel Yap
Subject: Re: Question about commits in CVSROOT and running loginfo scripts
Date: Wed, 27 Mar 2002 05:49:56 -0800 (PST)

--- Mark <address@hidden> wrote:
> When I tryed to have a loginfo script read the
> writers file, it seems that the
> administrative database isn't really rebuilt till
> after the loginfo scripts
> have completed runing. The writers file read by the
> loginfo script always sees
> a writers file without the changes I just commitied.
> (The loginfo script was
> reading the actual writers file in the repository).
> I had to have it use the
> workarea copy to read the accurate contents. Is this
> the correct operation of
> the admin files in CVSROOT on commits?

Since loginfo scripts (or at least loginfo itself) are
CVSROOT files themselves, it makes sense that CVSROOT
files are updated after loginfo scripts execute.

> Is this the same with all other files in CVS? One
> thing that has cause issues
> for me is that it seems cvs maintains locks after a
> commit while the loginfo
> scripts are running (I had found out about these
> lock issues trying to add to
> the commited file's log message in a loginfo
> script). I had to fork the script
> and exit the parent to get cvs to release the lock,
> though I am not sure what
> is really happening or what I really did to get
> things working. Can anyone
> elaborate on how cvs deals with locks after a commit
> and into the running of
> loginfo scripts?

If you do this, you introduce a race condition.  For
example, more than one loginfo script may now be
executing.  If you need to use CVS commands within
loginfo, try either using RCS commands, or create a
temporary module who's archive files are symlinked to
the real module's archive files.  Do not fork unless
you're positive race conditions won't affect you.

Noel


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]