136 try: |
136 try: |
137 os.rename(fileName, fileName + ".orig") |
137 os.rename(fileName, fileName + ".orig") |
138 except EnvironmentError: |
138 except EnvironmentError: |
139 pass |
139 pass |
140 try: |
140 try: |
141 hgOut = subprocess.check_output(["hg", "identify", "-i"]) |
141 hgOut = subprocess.check_output(["hg", "identify", "-i"]) # secok |
142 hgOut = hgOut.decode() |
142 hgOut = hgOut.decode() |
143 except (OSError, subprocess.CalledProcessError): |
143 except (OSError, subprocess.CalledProcessError): |
144 hgOut = "" |
144 hgOut = "" |
145 if hgOut: |
145 if hgOut: |
146 hgOut = hgOut.strip() |
146 hgOut = hgOut.strip() |