install.py

branch
6_0_x
changeset 4308
3f9ea1a38560
parent 4240
171caaf2dac2
child 4375
12817b378138
--- a/install.py	Sat Jul 04 11:52:05 2015 +0200
+++ b/install.py	Sat Jul 04 14:46:40 2015 +0200
@@ -1323,7 +1323,10 @@
     if not fileName:
         return
     
-    os.rename(fileName, fileName + ".orig")
+    try:
+        os.rename(fileName, fileName + ".orig")
+    except EnvironmentError:
+        pass
     try:
         hgOut = subprocess.check_output(["hg", "identify", "-i"])
         if sys.version_info[0] == 3:
@@ -1340,7 +1343,8 @@
             f = open(fileName + ".orig", "r", encoding="utf-8")
         text = f.read()
         f.close()
-        text = text.replace("@@REVISION@@", hgOut)
+        text = text.replace("@@REVISION@@", hgOut)\
+            .replace("@@VERSION@@", "rev_" + hgOut)
         copyToFile(fileName, text)
     else:
         shutil.copy(fileName + ".orig", fileName)

eric ide

mercurial