comparison mercurial/revlog.py @ 31580:a8e55d6f1d67

revlog: use pycompat.maplist to eagerly evaluate map on Python 3 According to Pulkit, this should fix `hg status --all` on Python 3.
author Augie Fackler <augie@google.com>
date Tue, 21 Mar 2017 17:39:49 -0400
parents 73aa13bc8dac
children 6ceb3c4c3ab6
comparison
equal deleted inserted replaced
31579:55c6788c54e2 31580:a8e55d6f1d67
31 from . import ( 31 from . import (
32 ancestor, 32 ancestor,
33 error, 33 error,
34 mdiff, 34 mdiff,
35 parsers, 35 parsers,
36 pycompat,
36 templatefilters, 37 templatefilters,
37 util, 38 util,
38 ) 39 )
39 40
40 _pack = struct.pack 41 _pack = struct.pack
941 a, b = self.rev(a), self.rev(b) 942 a, b = self.rev(a), self.rev(b)
942 try: 943 try:
943 ancs = self.index.commonancestorsheads(a, b) 944 ancs = self.index.commonancestorsheads(a, b)
944 except (AttributeError, OverflowError): # C implementation failed 945 except (AttributeError, OverflowError): # C implementation failed
945 ancs = ancestor.commonancestorsheads(self.parentrevs, a, b) 946 ancs = ancestor.commonancestorsheads(self.parentrevs, a, b)
946 return map(self.node, ancs) 947 return pycompat.maplist(self.node, ancs)
947 948
948 def isancestor(self, a, b): 949 def isancestor(self, a, b):
949 """return True if node a is an ancestor of node b 950 """return True if node a is an ancestor of node b
950 951
951 The implementation of this is trivial but the use of 952 The implementation of this is trivial but the use of