Show More
@@ -1861,7 +1861,7 b' class localrepository(object):' | |||
|
1861 | 1861 | changeid = hex(changeid) # for the error message |
|
1862 | 1862 | raise |
|
1863 | 1863 | |
|
1864 |
elif len(changeid) == |
|
|
1864 | elif len(changeid) == 2 * self.nodeconstants.nodelen: | |
|
1865 | 1865 | node = bin(changeid) |
|
1866 | 1866 | rev = self.changelog.rev(node) |
|
1867 | 1867 | else: |
@@ -1320,7 +1320,7 b' class revlog(object):' | |||
|
1320 | 1320 | return self.node(rev) |
|
1321 | 1321 | except (ValueError, OverflowError): |
|
1322 | 1322 | pass |
|
1323 | if len(id) == 40: | |
|
1323 | if len(id) == 2 * self.nodeconstants.nodelen: | |
|
1324 | 1324 | try: |
|
1325 | 1325 | # a full hex nodeid? |
|
1326 | 1326 | node = bin(id) |
@@ -1724,7 +1724,7 b' def named(repo, subset, x):' | |||
|
1724 | 1724 | def _node(repo, n): |
|
1725 | 1725 | """process a node input""" |
|
1726 | 1726 | rn = None |
|
1727 | if len(n) == 40: | |
|
1727 | if len(n) == 2 * repo.nodeconstants.nodelen: | |
|
1728 | 1728 | try: |
|
1729 | 1729 | rn = repo.changelog.rev(bin(n)) |
|
1730 | 1730 | except error.WdirUnsupported: |
@@ -643,7 +643,7 b' def revsymbol(repo, symbol):' | |||
|
643 | 643 | except (ValueError, OverflowError, IndexError): |
|
644 | 644 | pass |
|
645 | 645 | |
|
646 |
if len(symbol) == |
|
|
646 | if len(symbol) == 2 * repo.nodeconstants.nodelen: | |
|
647 | 647 | try: |
|
648 | 648 | node = bin(symbol) |
|
649 | 649 | rev = repo.changelog.rev(node) |
@@ -764,9 +764,10 b' def shortest(context, mapping, args):' | |||
|
764 | 764 | ) |
|
765 | 765 | |
|
766 | 766 | repo = context.resource(mapping, b'repo') |
|
767 | if len(hexnode) > 40: | |
|
767 | hexnodelen = 2 * repo.nodeconstants.nodelen | |
|
768 | if len(hexnode) > hexnodelen: | |
|
768 | 769 | return hexnode |
|
769 |
elif len(hexnode) == |
|
|
770 | elif len(hexnode) == hexnodelen: | |
|
770 | 771 | try: |
|
771 | 772 | node = bin(hexnode) |
|
772 | 773 | except TypeError: |
General Comments 0
You need to be logged in to leave comments.
Login now