mercurial/obsolete.py
changeset 17429 72fa4ef2245f
parent 17426 9724f8f8850b
child 17469 fb72eec7efd8
--- a/mercurial/obsolete.py	Mon Aug 27 23:14:27 2012 +0200
+++ b/mercurial/obsolete.py	Mon Aug 27 23:16:22 2012 +0200
@@ -58,6 +58,8 @@
 _pack = struct.pack
 _unpack = struct.unpack
 
+_SEEK_END = 2 # os.SEEK_END was introduced in Python 2.5
+
 # the obsolete feature is not mature enough to be enabled by default.
 # you have to rely on third party extension extension to enable this.
 _enabled = False
@@ -207,7 +209,7 @@
                 # defined. So we must seek to the end before calling tell(),
                 # or we may get a zero offset for non-zero sized files on
                 # some platforms (issue3543).
-                f.seek(0, 2) # os.SEEK_END
+                f.seek(0, _SEEK_END)
                 offset = f.tell()
                 transaction.add('obsstore', offset)
                 # offset == 0: new file - add the version header