[pypy-svn] r10037 - pypy/dist/pypy/documentation/revreport
arigo at codespeak.net
arigo at codespeak.net
Mon Mar 21 23:58:33 CET 2005
Author: arigo
Date: Mon Mar 21 23:58:33 2005
New Revision: 10037
Modified:
pypy/dist/pypy/documentation/revreport/revreport.py
Log:
revreport: should not make the symlink "current" point to the max revision
present, because this max revision's directory is likely to be still
half-empty and being generated. If "latest != revdir" we should probably not
set the symlink at all and wait until the other process finishes and sets the
link itself.
Modified: pypy/dist/pypy/documentation/revreport/revreport.py
==============================================================================
--- pypy/dist/pypy/documentation/revreport/revreport.py (original)
+++ pypy/dist/pypy/documentation/revreport/revreport.py Mon Mar 21 23:58:33 2005
@@ -11,7 +11,7 @@
assert DEST.dirpath().check()
-def updatecurrent():
+def updatecurrent(revdir):
l = []
for x in DEST.listdir():
try:
@@ -21,6 +21,8 @@
else:
l.append(x)
latest = DEST.join(str(max(l)))
+ if latest != revdir: # another process is busy generating the next rev
+ return # then don't change the link!
assert latest.check()
current = DEST.join('current')
if current.check():
@@ -52,4 +54,4 @@
print "stdout"
print out
print "generated into", revdir
- updatecurrent()
+ updatecurrent(revdir)
More information about the Pypy-commit
mailing list