##// END OF EJS Templates
revlog: avoid hard-coded hash sizes...
Joerg Sonnenberger -
r45596:cc257292 default
parent child Browse files
Show More
@@ -1523,7 +1523,7 b' class revlog(object):'
1523
1523
1524 def disambiguate(hexnode, minlength):
1524 def disambiguate(hexnode, minlength):
1525 """Disambiguate against wdirid."""
1525 """Disambiguate against wdirid."""
1526 for length in range(minlength, 41):
1526 for length in range(minlength, len(hexnode) + 1):
1527 prefix = hexnode[:length]
1527 prefix = hexnode[:length]
1528 if not maybewdir(prefix):
1528 if not maybewdir(prefix):
1529 return prefix
1529 return prefix
@@ -1540,12 +1540,12 b' class revlog(object):'
1540 pass
1540 pass
1541
1541
1542 if node == wdirid:
1542 if node == wdirid:
1543 for length in range(minlength, 41):
1543 for length in range(minlength, len(hexnode) + 1):
1544 prefix = hexnode[:length]
1544 prefix = hexnode[:length]
1545 if isvalid(prefix):
1545 if isvalid(prefix):
1546 return prefix
1546 return prefix
1547
1547
1548 for length in range(minlength, 41):
1548 for length in range(minlength, len(hexnode) + 1):
1549 prefix = hexnode[:length]
1549 prefix = hexnode[:length]
1550 if isvalid(prefix):
1550 if isvalid(prefix):
1551 return disambiguate(hexnode, length)
1551 return disambiguate(hexnode, length)
General Comments 0
You need to be logged in to leave comments. Login now