# HG changeset patch # User Jeff Hammel # Date 1355172972 28800 # Node ID 864172062af71be1df0e662f30aff0380e2a0b42 # Parent 1a6125362640c3e5f0966ea064ec2759b3e547ae become religious diff -r 1a6125362640 -r 864172062af7 mozillatry.py --- 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"""