[pypy-commit] buildbot default: add a step to purge hg files via command line trickery on windows

mattip pypy.commits at gmail.com
Wed Nov 13 10:42:54 EST 2019


Author: Matti Picus <matti.picus at gmail.com>
Branch: 
Changeset: r1102:4a51f6392247
Date: 2019-11-13 10:42 -0500
http://bitbucket.org/pypy/buildbot/changeset/4a51f6392247/

Log:	add a step to purge hg files via command line trickery on windows

diff --git a/bot2/pypybuildbot/builds.py b/bot2/pypybuildbot/builds.py
--- a/bot2/pypybuildbot/builds.py
+++ b/bot2/pypybuildbot/builds.py
@@ -319,6 +319,14 @@
                              workdir=workdir,
                              timeout=3600,
                              haltOnFailure=True))
+    if platform == "win32":
+        # Clean out files via DOS to avoid long filename limitations in hg
+        command = 'for /F "usebackq tokens=1,2" %I IN (`hg stat`) DO @IF "?" == "%I" DEL %J'
+        factory.addStep(
+            ShellCmd(description="clean up files",
+                     command=command,
+                     workdir=workdir,
+                     haltOnFailure=True))
     #
     factory.addStep(
         ShellCmd(description="hg purge",


More information about the pypy-commit mailing list