Author: Matti Picus <[email protected]>
Branch: 
Changeset: r1028:201463d5f98a
Date: 2017-09-15 12:59 +0300
http://bitbucket.org/pypy/buildbot/changeset/201463d5f98a/

Log:    merge branch to remove hg bookmarks during hg cleanup

diff --git a/bot2/pypybuildbot/builds.py b/bot2/pypybuildbot/builds.py
--- a/bot2/pypybuildbot/builds.py
+++ b/bot2/pypybuildbot/builds.py
@@ -333,11 +333,25 @@
            workdir=workdir))
 
 def update_hg(platform, factory, repourl, workdir, use_branch,
-              force_branch=None):
+              force_branch=None, wipe_bookmarks=False):
     if not use_branch:
         assert force_branch is None
         update_hg_old_method(platform, factory, repourl, workdir)
         return
+
+    if wipe_bookmarks:
+        # We don't use bookmarks at all.  If a bookmark accidentally gets
+        # created and pushed to the server and we pull it down, it gets stuck
+        # here.  Deleting it from the server doesn't seem to delete it from
+        # the local checkout.  So, manually clean it up.
+        factory.addStep(ShellCmd(
+            description="cleanup bookmarks",
+            command=["rm", "-f", ".hg/bookmarks"] if platform != 'win32'
+               else [r"cmd /c if exist .hg\bookmarks del .hg\bookmarks"],
+            workdir=workdir,
+            haltOnFailure=False,
+        ))
+
     factory.addStep(
             Mercurial(
                 repourl=repourl,
@@ -374,7 +388,7 @@
                                   doStepIf=ParseRevision.doStepIf))
     #
     update_hg(platform, factory, repourl, workdir, use_branch=True,
-              force_branch=force_branch)
+              force_branch=force_branch, wipe_bookmarks=True)
     #
     factory.addStep(CheckGotRevision(workdir=workdir))
 
@@ -410,7 +424,7 @@
     # If target_tmpdir is empty, crash.
     tmp_or_crazy = '%(prop:target_tmpdir:-crazy/name/so/mkdir/fails/)s'
     pytest = "pytest"
-    factory.addStep(ShellCmd( 
+    factory.addStep(ShellCmd(
         description="mkdir for tests",
         command=['python', '-c', Interpolate("import os;  os.mkdir(r'" + \
                     tmp_or_crazy + pytest + "') if not os.path.exists(r'" + \
@@ -424,7 +438,7 @@
                    '/D', '-' + nDays, '/c', "cmd /c rmdir /q /s @path"]
     else:
         command = ['find', Interpolate(tmp_or_crazy + pytest), '-mtime',
-                   '+' + nDays, '-exec', 'rm', '-r', '{}', ';'] 
+                   '+' + nDays, '-exec', 'rm', '-r', '{}', ';']
     factory.addStep(SuccessAlways(
         description="cleanout old test files",
         command = command,
@@ -481,7 +495,7 @@
         # If target_tmpdir is empty, crash.
         tmp_or_crazy = '%(prop:target_tmpdir:-crazy/name/so/mkdir/fails/)s'
         pytest = "pytest"
-        self.addStep(ShellCmd( 
+        self.addStep(ShellCmd(
             description="mkdir for tests",
             command=['python', '-c', Interpolate("import os;  os.mkdir(r'" + \
                         tmp_or_crazy + pytest + "') if not os.path.exists(r'" 
+ \
@@ -495,7 +509,7 @@
                        '/D', '-' + nDays, '/c', "cmd /c rmdir /q /s @path"]
         else:
             command = ['find', Interpolate(tmp_or_crazy + pytest), '-mtime',
-                       '+' + nDays, '-exec', 'rm', '-r', '{}', ';'] 
+                       '+' + nDays, '-exec', 'rm', '-r', '{}', ';']
         self.addStep(SuccessAlways(
             description="cleanout old test files",
             command = command,
@@ -976,7 +990,7 @@
             workdir='pypy-c',
             haltOnFailure=True,
             ))
-        
+
         if platform == 'win32':
             self.addStep(ShellCmd(
                 description='move decompressed dir',
@@ -1010,7 +1024,7 @@
         # obtain a pypy-compatible branch of numpy
         numpy_url = 'https://www.bitbucket.org/pypy/numpy'
         update_git(platform, self, numpy_url, 'numpy_src', branch='master',
-                   alwaysUseLatest=True, # ignore pypy rev number when 
+                   alwaysUseLatest=True, # ignore pypy rev number when
                                          # triggered by a pypy build
                    )
 
diff --git a/master/templates/layout.html b/master/templates/layout.html
--- a/master/templates/layout.html
+++ b/master/templates/layout.html
@@ -25,8 +25,9 @@
         <a href="{{ path_to_root or '.' }}">Home</a>
         <!-- PyPy specific items -->
         - <a href="http://speed.pypy.org/";>Speed</a>
-        - <a href="{{ path_to_root }}numpy-status/">NumPy compatibility</a>
+        - <!-- a href="{{ path_to_root }}numpy-status/">NumPy compatibility</a 
-->
         - <a href="{{ path_to_root }}summary?branch=&lt;trunk&gt;">Summary 
(trunk)</a>
+        - <a href="{{ path_to_root }}summary?branch=3.5">Summary (py3.5)</a>
         - <a href="{{ path_to_root }}summary">Summary</a>
         - <a href="{{ path_to_root }}nightly/">Nightly builds</a>
         <!-- end of PyPy specific items -->
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to