[Python-Dev] Re: [Python-checkins] CVS: python/nondist/peps pep-0228.txt,NONE,1.1 pep-0000.txt,1.44,1.45

Thomas Wouters thomas@xs4all.net
Sun, 5 Nov 2000 23:12:35 +0100

On Sun, Nov 05, 2000 at 01:54:39PM -0800, Greg Stein wrote:
> On Sun, Nov 05, 2000 at 08:18:51PM +0100, Thomas Wouters wrote:

> It certainly could be a race condition. Just look at blast_mail(). It forks
> off the operation, and it might run before the file arrives in the
> repository. (??)

No... that's not it.

> Or is it possible that the script looks for pep-0228.txt rather than getting
> a copy from pep-0228.txt,v ??

Almost correct :) The problem is that the loginfo process is run in the
server-specific /tmp dir, and the filename is not prefixed by the path to
the CVSROOT or some such. I guess it's pure coincidence that the file is
still there when the syncmail script arrives at the 'open()' call.

> My script does "cvs -Qn update -p -r1.1 FILE" for new files, and pipes
> that to the output.

Yes... I just wrote a small patch to syncmail which does exactly that
(actually, it uses 'newrev' rather than a hardcoded '1.1', and it uses -f
and -n but not -Q -- if we add -Q, we should add it to the diff commands as
well, and it might confuse developers that are used to reading the debug
info ;)

The main reason I'm delaying the checkin is to test it on the only CVS
repository I can play with, which is over a slow link to an american
highschool. Now if only you had mailed an hour earlier, Greg, I wouldn't
have had to go through that trouble ;)

> [ and the point in blast_mail() about holding the CVS lock too long is
>   rather silly given the horsepower of the SourceForge boxes ]

Well, syncmail was written to manage the Python CVS tree on a slow Sun (I
believe) and did an rsync-over-ssh to another machine as well. That can
definately take long ;) If we just remove the fork, the rest of syncmail
might just work, even with new files. In the mean time, I'll check in my
change. It might be the best thing to do anyway, since it shouldn't
interfere unless the file isn't there.

Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!