Show More
@@ -48,6 +48,9 b' class revnav(object):' | |||||
48 | """ |
|
48 | """ | |
49 | self.nodefunc = nodefunc |
|
49 | self.nodefunc = nodefunc | |
50 |
|
50 | |||
|
51 | def hex(self, rev): | |||
|
52 | return self.nodefunc(rev).hex() | |||
|
53 | ||||
51 | def gen(self, pos, pagelen, limit): |
|
54 | def gen(self, pos, pagelen, limit): | |
52 | """computes label and revision id for navigation link |
|
55 | """computes label and revision id for navigation link | |
53 |
|
56 | |||
@@ -69,15 +72,13 b' class revnav(object):' | |||||
69 | if f > limit: |
|
72 | if f > limit: | |
70 | break |
|
73 | break | |
71 | if pos + f < limit: |
|
74 | if pos + f < limit: | |
72 | navafter.append(("+%d" % f, |
|
75 | navafter.append(("+%d" % f, self.hex(pos + f))) | |
73 | hex(self.nodefunc(pos + f).node()))) |
|
|||
74 | if pos - f >= 0: |
|
76 | if pos - f >= 0: | |
75 | navbefore.insert(0, ("-%d" % f, |
|
77 | navbefore.insert(0, ("-%d" % f, self.hex(pos - f))) | |
76 | hex(self.nodefunc(pos - f).node()))) |
|
|||
77 |
|
78 | |||
78 | navafter.append(("tip", "tip")) |
|
79 | navafter.append(("tip", "tip")) | |
79 | try: |
|
80 | try: | |
80 |
navbefore.insert(0, ("(0)", hex( |
|
81 | navbefore.insert(0, ("(0)", self.hex(0))) | |
81 | except error.RepoError: |
|
82 | except error.RepoError: | |
82 | pass |
|
83 | pass | |
83 |
|
84 |
General Comments 0
You need to be logged in to leave comments.
Login now