Patchwork [2,of,3,V2] branchmap: backout 6bf93440a717

login
register
mail settings
Submitter Matt Harbison
Date Feb. 6, 2015, 3:19 a.m.
Message ID <46fe95366461159cb59b.1423192755@Envy>
Download mbox | patch
Permalink /patch/7702/
State Accepted
Commit 32a64923d2b73c1a2e105603edd073cf1db1eb6d
Headers show

Comments

Matt Harbison - Feb. 6, 2015, 3:19 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1422726125 18000
#      Sat Jan 31 12:42:05 2015 -0500
# Node ID 46fe95366461159cb59b4380350255f2933d75ed
# Parent  05678c22e04da407ab610765248636a125e1348a
branchmap: backout 6bf93440a717

This is no longer needed now that posixfile handles seeking to EOF when it opens
a file in append mode.

Patch

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -407,9 +407,6 @@ 
             try:
                 if self._rbcnamescount != 0:
                     f = repo.vfs.open(_rbcnames, 'ab')
-                    # The position after open(x, 'a') is implementation defined-
-                    # see issue3543.  SEEK_END was added in 2.5
-                    f.seek(0, 2) #os.SEEK_END
                     if f.tell() == self._rbcsnameslen:
                         f.write('\0')
                     else:
@@ -434,9 +431,6 @@ 
             revs = min(len(repo.changelog), len(self._rbcrevs) // _rbcrecsize)
             try:
                 f = repo.vfs.open(_rbcrevs, 'ab')
-                # The position after open(x, 'a') is implementation defined-
-                # see issue3543.  SEEK_END was added in 2.5
-                f.seek(0, 2) #os.SEEK_END
                 if f.tell() != start:
                     repo.ui.debug("truncating %s to %s\n" % (_rbcrevs, start))
                     f.seek(start)