comparison mozillatry.py @ 27:bd358da5c346

this is getting out of hand
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 Dec 2012 15:41:01 -0800
parents fa1215cee8c4
children faacdfcd8ac9
comparison
equal deleted inserted replaced
26:fa1215cee8c4 27:bd358da5c346
47 47
48 # if no patches given and not updating, commit what you have 48 # if no patches given and not updating, commit what you have
49 if not patches and not update: 49 if not patches and not update:
50 hg_dir = os.path.join(repo, '.hg') 50 hg_dir = os.path.join(repo, '.hg')
51 assert os.path.exists(hg_dir) and os.path.isdir(hg_dir) 51 assert os.path.exists(hg_dir) and os.path.isdir(hg_dir)
52 patches = os.path.join(hg_dir, 'patches') 52 patches_dir = os.path.join(hg_dir, 'patches')
53 if os.path.exists(patches): 53 if os.path.exists(patches_dir):
54 shutil.rmtree(patches) 54 shutil.rmtree(patches_dir)
55 call(['hg', 'qinit'], cwd=repo) 55 call(['hg', 'qinit'], cwd=repo)
56 # TODO: ensure there's something to commit 56 # TODO: ensure there's something to commit
57 call(['hg', 'qnew', datetime.datetime.now().strftime("%Y%m%d%H%M%S")], cwd=repo) 57 call(['hg', 'qnew', datetime.datetime.now().strftime("%Y%m%d%H%M%S")], cwd=repo)
58 58
59 # apply patches 59 # apply patches