changeset 24053:dc4fa3992414

obsolete: drop the explicit seek to EOF after append mode open() posixfile now handles this.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 31 Jan 2015 12:54:35 -0500
parents 32a64923d2b7
children fdf7794be41d
files mercurial/obsolete.py
diffstat 1 files changed, 0 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/obsolete.py	Sat Jan 31 12:42:05 2015 -0500
+++ b/mercurial/obsolete.py	Sat Jan 31 12:54:35 2015 -0500
@@ -77,8 +77,6 @@
 _calcsize = struct.calcsize
 propertycache = util.propertycache
 
-_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
@@ -592,12 +590,6 @@
         if new:
             f = self.sopener('obsstore', 'ab')
             try:
-                # Whether the file's current position is at the begin or at
-                # the end after opening a file for appending is implementation
-                # 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, _SEEK_END)
                 offset = f.tell()
                 transaction.add('obsstore', offset)
                 # offset == 0: new file - add the version header