1. Alain Leufroy
  2. mutable-history

Commits

Pierre-Yves David  committed 97a5c94

Compat with mercurial 1.9.2

  • Participants
  • Parent commits 8108d56
  • Branches default

Comments (0)

Files changed (2)

File hgext/obsolete.py

View file
  • Ignore whitespace
             f = self.opener('obsolete-relations', 'w', atomictemp=True)
             try:
                 _obsserialise(self._obssubrels, f)
-                f.rename()
+                try:
+                    f.rename()
+                except AttributeError: # old version
+                    f.close()
             finally:
                 f.close()
 

File hgext/states.py

View file
  • Ignore whitespace
     try:
         for h in heads:
             f.write(hex(h) + '\n')
-        f.rename()
+        try:
+            f.rename()
+        except AttributeError: # old version
+            f.close()
     finally:
         f.close()
 
             try:
                 for st in self._enabledstates:
                     f.write(st.name + '\n')
-                f.rename()
+                try:
+                    f.rename()
+                except AttributeError: # old version
+                    f.close()
             finally:
                 f.close()