Mercurial > hg > graal-jvmci-8
diff mxtool/mx.py @ 15408:7a5c34543493
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 28 Apr 2014 16:35:06 +0200 |
parents | ca16edfcecd5 5dcf0ae606f3 |
children | f093fa76e872 |
line wrap: on
line diff
--- a/mxtool/mx.py Mon Apr 28 16:34:36 2014 +0200 +++ b/mxtool/mx.py Mon Apr 28 16:35:06 2014 +0200 @@ -608,6 +608,17 @@ else: return None + def isDirty(self, sDir, abortOnError=True): + try: + return len(subprocess.check_output(['hg', 'status', '-R', sDir])) > 0 + except OSError: + warn(self.missing) + except subprocess.CalledProcessError: + if abortOnError: + abort('failed to get status') + else: + return None + class Suite: def __init__(self, mxDir, primary, load=True): self.dir = dirname(mxDir)