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