1354 pass |
1354 pass |
1355 try: |
1355 try: |
1356 hgOut = subprocess.check_output(["hg", "identify", "-i"]) |
1356 hgOut = subprocess.check_output(["hg", "identify", "-i"]) |
1357 if sys.version_info[0] == 3: |
1357 if sys.version_info[0] == 3: |
1358 hgOut = hgOut.decode() |
1358 hgOut = hgOut.decode() |
1359 except (FileNotFoundError, subprocess.CalledProcessError): |
1359 except (OSError, subprocess.CalledProcessError): |
1360 hgOut = "" |
1360 hgOut = "" |
1361 if hgOut: |
1361 if hgOut: |
1362 hgOut = hgOut.strip() |
1362 hgOut = hgOut.strip() |
1363 if hgOut.endswith("+"): |
1363 if hgOut.endswith("+"): |
1364 hgOut = hgOut[:-1] |
1364 hgOut = hgOut[:-1] |