##// END OF EJS Templates
manifest: define and implement rev() on manifestlog...
Gregory Szorc -
r38573:f2f9bacf default
parent child Browse files
Show More
@@ -228,7 +228,7 b' class changesetprinter(object):'
228
228
229 if self.ui.debugflag and rev is not None:
229 if self.ui.debugflag and rev is not None:
230 mnode = ctx.manifestnode()
230 mnode = ctx.manifestnode()
231 mrev = self.repo.manifestlog._revlog.rev(mnode)
231 mrev = self.repo.manifestlog.rev(mnode)
232 self.ui.write(columns['manifest']
232 self.ui.write(columns['manifest']
233 % scmutil.formatrevnode(self.ui, mrev, mnode),
233 % scmutil.formatrevnode(self.ui, mrev, mnode),
234 label='ui.debug log.manifest')
234 label='ui.debug log.manifest')
@@ -1348,6 +1348,9 b' class manifestlog(object):'
1348 self._dirmancache.clear()
1348 self._dirmancache.clear()
1349 self._revlog.clearcaches()
1349 self._revlog.clearcaches()
1350
1350
1351 def rev(self, node):
1352 return self._revlog.rev(node)
1353
1351 @interfaceutil.implementer(repository.imanifestrevisionwritable)
1354 @interfaceutil.implementer(repository.imanifestrevisionwritable)
1352 class memmanifestctx(object):
1355 class memmanifestctx(object):
1353 def __init__(self, manifestlog):
1356 def __init__(self, manifestlog):
@@ -922,6 +922,12 b' class imanifestlog(interfaceutil.Interfa'
922 def clearcaches():
922 def clearcaches():
923 """Clear caches associated with this collection."""
923 """Clear caches associated with this collection."""
924
924
925 def rev(node):
926 """Obtain the revision number for a binary node.
927
928 Raises ``error.LookupError`` if the node is not known.
929 """
930
925 class completelocalrepository(interfaceutil.Interface):
931 class completelocalrepository(interfaceutil.Interface):
926 """Monolithic interface for local repositories.
932 """Monolithic interface for local repositories.
927
933
@@ -465,7 +465,7 b' def showmanifest(context, mapping):'
465 if mnode is None:
465 if mnode is None:
466 # just avoid crash, we might want to use the 'ff...' hash in future
466 # just avoid crash, we might want to use the 'ff...' hash in future
467 return
467 return
468 mrev = repo.manifestlog._revlog.rev(mnode)
468 mrev = repo.manifestlog.rev(mnode)
469 mhex = hex(mnode)
469 mhex = hex(mnode)
470 mapping = context.overlaymap(mapping, {'rev': mrev, 'node': mhex})
470 mapping = context.overlaymap(mapping, {'rev': mrev, 'node': mhex})
471 f = context.process('manifest', mapping)
471 f = context.process('manifest', mapping)
General Comments 0
You need to be logged in to leave comments. Login now