Show More
@@ -873,16 +873,16 b' class revlog(object):' | |||
|
873 | 873 | if len(id) < 40: |
|
874 | 874 | try: |
|
875 | 875 | # hex(node)[:...] |
|
876 |
|
|
|
877 |
|
|
|
878 | for n in self.nodemap: | |
|
879 |
|
|
|
880 |
|
|
|
881 | raise LookupError(id, self.indexfile, | |
|
882 | _('ambiguous identifier')) | |
|
883 | node = n | |
|
884 | if node is not None: | |
|
885 |
|
|
|
876 | l = len(id) / 2 # grab an even number of digits | |
|
877 | bin_id = bin(id[:l*2]) | |
|
878 | nl = [n for n in self.nodemap if n[:l] == bin_id] | |
|
879 | nl = [n for n in nl if hex(n).startswith(id)] | |
|
880 | if len(nl) > 0: | |
|
881 | if len(nl) == 1: | |
|
882 | return nl[0] | |
|
883 | raise LookupError(id, self.indexfile, | |
|
884 | _('ambiguous identifier')) | |
|
885 | return None | |
|
886 | 886 | except TypeError: |
|
887 | 887 | pass |
|
888 | 888 |
General Comments 0
You need to be logged in to leave comments.
Login now