mercurial/templatefuncs.py
changeset 37708 8e8541610d85
parent 37680 e743b8524d60
child 37709 7b2955624777
--- a/mercurial/templatefuncs.py	Sun Apr 15 19:41:34 2018 +0800
+++ b/mercurial/templatefuncs.py	Fri Apr 13 10:36:03 2018 -0700
@@ -587,11 +587,8 @@
                                 # i18n: "shortest" is a keyword
                                 _("shortest() expects an integer minlength"))
 
-    # _partialmatch() of filtered changelog could take O(len(repo)) time,
-    # which would be unacceptably slow. so we look for hash collision in
-    # unfiltered space, which means some hashes may be slightly longer.
     repo = context.resource(mapping, 'ctx')._repo
-    return scmutil.shortesthexnodeidprefix(repo.unfiltered(), node, minlength)
+    return scmutil.shortesthexnodeidprefix(repo, node, minlength)
 
 @templatefunc('strip(text[, chars])')
 def strip(context, mapping, args):