##// END OF EJS Templates
obsolete: drop the explicit seek to EOF after append mode open()...
Matt Harbison -
r24053:dc4fa399 default
parent child Browse files
Show More
@@ -77,8 +77,6 b' from i18n import _'
77 _calcsize = struct.calcsize
77 _calcsize = struct.calcsize
78 propertycache = util.propertycache
78 propertycache = util.propertycache
79
79
80 _SEEK_END = 2 # os.SEEK_END was introduced in Python 2.5
81
82 # the obsolete feature is not mature enough to be enabled by default.
80 # the obsolete feature is not mature enough to be enabled by default.
83 # you have to rely on third party extension extension to enable this.
81 # you have to rely on third party extension extension to enable this.
84 _enabled = False
82 _enabled = False
@@ -592,12 +590,6 b' class obsstore(object):'
592 if new:
590 if new:
593 f = self.sopener('obsstore', 'ab')
591 f = self.sopener('obsstore', 'ab')
594 try:
592 try:
595 # Whether the file's current position is at the begin or at
596 # the end after opening a file for appending is implementation
597 # defined. So we must seek to the end before calling tell(),
598 # or we may get a zero offset for non-zero sized files on
599 # some platforms (issue3543).
600 f.seek(0, _SEEK_END)
601 offset = f.tell()
593 offset = f.tell()
602 transaction.add('obsstore', offset)
594 transaction.add('obsstore', offset)
603 # offset == 0: new file - add the version header
595 # offset == 0: new file - add the version header
General Comments 0
You need to be logged in to leave comments. Login now