Comments
Patch
@@ -465,7 +465,7 @@
if mnode is None:
# just avoid crash, we might want to use the 'ff...' hash in future
return
- mrev = repo.manifestlog._revlog.rev(mnode)
+ mrev = repo.manifestlog.rev(mnode)
mhex = hex(mnode)
mapping = context.overlaymap(mapping, {'rev': mrev, 'node': mhex})
f = context.process('manifest', mapping)
@@ -922,6 +922,12 @@
def clearcaches():
"""Clear caches associated with this collection."""
+ def rev(node):
+ """Obtain the revision number for a binary node.
+
+ Raises ``error.LookupError`` if the node is not known.
+ """
+
class completelocalrepository(interfaceutil.Interface):
"""Monolithic interface for local repositories.
@@ -1348,6 +1348,9 @@
self._dirmancache.clear()
self._revlog.clearcaches()
+ def rev(self, node):
+ return self._revlog.rev(node)
+
@interfaceutil.implementer(repository.imanifestrevisionwritable)
class memmanifestctx(object):
def __init__(self, manifestlog):
@@ -228,7 +228,7 @@
if self.ui.debugflag and rev is not None:
mnode = ctx.manifestnode()
- mrev = self.repo.manifestlog._revlog.rev(mnode)
+ mrev = self.repo.manifestlog.rev(mnode)
self.ui.write(columns['manifest']
% scmutil.formatrevnode(self.ui, mrev, mnode),
label='ui.debug log.manifest')