Commits

Pierre-Yves David  committed 97a5c94

Compat with mercurial 1.9.2

  • Participants
  • Parent commits 8108d56

Comments (0)

Files changed (2)

File hgext/obsolete.py

             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

     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()