Skip to content
Snippets Groups Projects
Commit acb429c6 authored by Siddharth Agarwal's avatar Siddharth Agarwal
Browse files

git_handler.save_map: drop support for Mercurial < 1.9

parent 18a3dbd0
No related branches found
No related tags found
No related merge requests found
......@@ -169,10 +169,8 @@
file = self.repo.opener(self.mapfile, 'w+', atomictemp=True)
for hgsha, gitsha in sorted(self._map_hg.iteritems()):
file.write("%s %s\n" % (gitsha, hgsha))
# If this complains that NoneType is not callable, then
# atomictempfile no longer has either of rename (pre-1.9) or
# close (post-1.9)
getattr(file, 'rename', getattr(file, 'close', None))()
# If this complains, atomictempfile no longer has close
file.close()
def load_tags(self):
self.tags = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment