changeset 31:864172062af7

become religious
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 10 Dec 2012 12:56:12 -0800
parents 1a6125362640
children daf7c333e01c
files mozillatry.py
diffstat 1 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mozillatry.py	Mon Dec 10 12:53:32 2012 -0800
+++ b/mozillatry.py	Mon Dec 10 12:56:12 2012 -0800
@@ -19,18 +19,23 @@
     assert os.path.exists(directory) and os.path.isdir(directory)
     hg_dir = os.path.join(directory, '.hg')
     assert os.path.exists(hg_dir) and os.path.isdir(hg_dir)
-    call(['hg', 'revert', '--no-backup', '--all'], cwd=directory)
+
     try:
-        # XXX stupid; see
-        # https://wiki.mozilla.org/Build:TryServer#hg_phases
-        call(['hg', 'phase', '-f', '--draft', 'qbase:tip'], cwd=directory)
-    except subprocess.CalledProcessError:
-        pass
-    call(['hg', 'qpop', '--all'], cwd=directory)
-    patches = os.path.join(hg_dir, 'patches')
-    if os.path.exists(patches):
-        # remove patches
-        shutil.rmtree(patches)
+        call(['hg', 'revert', '--no-backup', '--all'], cwd=directory)
+        try:
+            # XXX stupid; see
+            # https://wiki.mozilla.org/Build:TryServer#hg_phases
+            call(['hg', 'phase', '-f', '--draft', 'qbase:tip'], cwd=directory)
+        except subprocess.CalledProcessError:
+            pass
+        call(['hg', 'qpop', '--all'], cwd=directory)
+        patches = os.path.join(hg_dir, 'patches')
+        if os.path.exists(patches):
+            # remove patches
+            shutil.rmtree(patches)
+    except:
+        sys.stderr.write("Directory: %s\n" % directory)
+        raise
 
 def update_repo(directory):
     """update an hg repository"""