Mercurial > mozilla > hg > MozillaTry
comparison mozillatry.py @ 29:ade4262c1c6d
oops, need an except clause
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 10 Dec 2012 12:11:45 -0800 |
parents | faacdfcd8ac9 |
children | 1a6125362640 |
comparison
equal
deleted
inserted
replaced
28:faacdfcd8ac9 | 29:ade4262c1c6d |
---|---|
7 import configuration | 7 import configuration |
8 import datetime | 8 import datetime |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
11 import shutil | 11 import shutil |
12 import subprocess | |
12 import sys | 13 import sys |
13 | 14 |
14 from subprocess import check_call as call | 15 from subprocess import check_call as call |
15 | 16 |
16 def reset(directory): | 17 def reset(directory): |
24 call(['hg', 'revert', '--no-backup', '--all'], cwd=directory) | 25 call(['hg', 'revert', '--no-backup', '--all'], cwd=directory) |
25 try: | 26 try: |
26 # XXX stupid; see | 27 # XXX stupid; see |
27 # https://wiki.mozilla.org/Build:TryServer#hg_phases | 28 # https://wiki.mozilla.org/Build:TryServer#hg_phases |
28 call(['hg', 'phase', '-f', '--draft', 'qbase:tip'], cwd=directory) | 29 call(['hg', 'phase', '-f', '--draft', 'qbase:tip'], cwd=directory) |
30 except subprocess.CalledProcessError: | |
31 pass | |
29 call(['hg', 'qpop', '--all'], cwd=directory) | 32 call(['hg', 'qpop', '--all'], cwd=directory) |
30 try: | 33 try: |
31 shutil.rmtree(os.path.join(hg_dir, 'patches')) # remove patches | 34 shutil.rmtree(os.path.join(hg_dir, 'patches')) # remove patches |
32 except: | 35 except: |
33 pass | 36 pass |