diff --git a/edenscm/hgext/remotefilelog/remotefilectx.py b/edenscm/hgext/remotefilelog/remotefilectx.py index 1c28e9202c..95662a6d41 100644 --- a/edenscm/hgext/remotefilelog/remotefilectx.py +++ b/edenscm/hgext/remotefilelog/remotefilectx.py @@ -214,15 +214,14 @@ class remotefilectx(context.filectx): def parents(self): repo = self._repo - ancestormap = self.ancestormap() - p1, p2, linknode, copyfrom = ancestormap[self._filenode] + p1, p2, linknode, copyfrom = self.getnodeinfo() results = [] if p1 != nullid: path = copyfrom or self._path flog = repo.file(path) p1ctx = remotefilectx( - repo, path, fileid=p1, filelog=flog, ancestormap=ancestormap + repo, path, fileid=p1, filelog=flog, ancestormap=self._ancestormap ) if self._descendantrevfastpath or "_changeid" in self.__dict__: p1ctx._descendantrev = self.rev() @@ -232,7 +231,7 @@ class remotefilectx(context.filectx): path = self._path flog = repo.file(path) p2ctx = remotefilectx( - repo, path, fileid=p2, filelog=flog, ancestormap=ancestormap + repo, path, fileid=p2, filelog=flog, ancestormap=self._ancestormap ) if self._descendantrevfastpath or "_changeid" in self.__dict__: p2ctx._descendantrev = self.rev() diff --git a/tests/test-fb-hgext-remotefilelog-blame.t b/tests/test-fb-hgext-remotefilelog-blame.t index d81d5794af..bf54440b1c 100644 --- a/tests/test-fb-hgext-remotefilelog-blame.t +++ b/tests/test-fb-hgext-remotefilelog-blame.t @@ -29,4 +29,4 @@ Test blame 0: x 1: y 2: z - 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) + 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over 0.00s diff --git a/tests/test-fb-hgext-remotefilelog-linknodes.t b/tests/test-fb-hgext-remotefilelog-linknodes.t index b0ed5b820f..59685694bc 100644 --- a/tests/test-fb-hgext-remotefilelog-linknodes.t +++ b/tests/test-fb-hgext-remotefilelog-linknodes.t @@ -258,7 +258,7 @@ Case 1: fastlog service calls fails or times out 32e6611f6149 xx2-fake-rebased public x 0632994590a8 xx public x b292c1e3311f x public x - 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) + 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over 0.00s Case 2: fastlog returns empty results @@ -321,6 +321,8 @@ Fastlog should never get called on draft commits Test linknode fixup logging + $ clearcache + Setup extension that logs ui.log linkrevfixup output on the stderr $ cat >> $TESTTMP/uilog.py < from edenscm.mercurial import extensions @@ -334,6 +336,10 @@ Setup extension that logs ui.log linkrevfixup output on the stderr > msgstr = msg[0] % msg[1:] > self.warn('%s: %s (%s)\n' % (service, msgstr, kwstr)) > return orig(self, service, *msg, **opts) + > def call_conduit(*args, **kwargs): + > return [{'hash': '123456'}] + > def conduit_config(*args, **kwargs): + > return True > EOF $ cat >> $HGRCPATH < [extensions] @@ -344,6 +350,7 @@ Silencing stdout because we are interested only in ui.log output $ hg log -f x -T '{node|short} {desc} {phase} {files}\n' > /dev/null linkrevfixup: adjusting linknode (filepath=x, fnode=d4a3ed9310e5bd9887e3bf779da5077efab28216, reponame=master, revs=a5957b6bf0bdeb9b96368bddd2838004ad966b7d, user=test) linkrevfixup: fastlog succeded (elapsed=*, filepath=x, fnode=d4a3ed9310e5bd9887e3bf779da5077efab28216, reponame=master, revs=a5957b6bf0bdeb9b96368bddd2838004ad966b7d, user=test) (glob) + 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over 0.00s Fastlog fails $ cat > $TESTTMP/bad_conduit.py <