Mercurial > hg
changeset 37340:8cf97e0e1730
narrow: pass node into revlog.revision()
This is one of the few (possibly only) places where we pass an int in
for filelogs. Other revlogs (notably changelog) are very heavy on int
usage. But filelogs are surprisingly node centric. I'd like to
formalize the interface around the use of nodes (at least for
filelogs). So let's switch to a node.
We can't inline revlog.node() because of a check-code rule. I think
that rule is suspect. But it may be for performance reasons with
changelog code. I'd rather not touch it at this time.
Differential Revision: https://phab.mercurial-scm.org/D3043
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 03 Apr 2018 09:54:20 -0700 |
parents | 5859800edfc5 |
children | d62d2e346acf |
files | hgext/narrow/narrowchangegroup.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/narrow/narrowchangegroup.py Tue Apr 03 10:15:21 2018 -0700 +++ b/hgext/narrow/narrowchangegroup.py Tue Apr 03 09:54:20 2018 -0700 @@ -350,8 +350,9 @@ p2 = node.nullrev else: p1, p2 = sorted(local(p) for p in linkparents) + n = revlog.node(rev) yield ellipsisdata( - self, rev, revlog, p1, p2, revlog.revision(rev), linknode) + self, rev, revlog, p1, p2, revlog.revision(n), linknode) extensions.wrapfunction(changegroup.cg1packer, 'revchunk', revchunk) def deltaparent(orig, self, revlog, rev, p1, p2, prev):