##// END OF EJS Templates
revlog: make round-down pattern clearer
Manuel Jacob -
r50141:31602d47 default
parent child Browse files
Show More
@@ -1527,8 +1527,8 b' class revlog:'
1527 if len(id) <= 40:
1527 if len(id) <= 40:
1528 try:
1528 try:
1529 # hex(node)[:...]
1529 # hex(node)[:...]
1530 l = len(id) // 2 # grab an even number of digits
1530 l = len(id) // 2 * 2 # grab an even number of digits
1531 prefix = bin(id[: l * 2])
1531 prefix = bin(id[:l])
1532 nl = [e[7] for e in self.index if e[7].startswith(prefix)]
1532 nl = [e[7] for e in self.index if e[7].startswith(prefix)]
1533 nl = [
1533 nl = [
1534 n for n in nl if hex(n).startswith(id) and self.hasnode(n)
1534 n for n in nl if hex(n).startswith(id) and self.hasnode(n)
General Comments 0
You need to be logged in to leave comments. Login now