selection.reverse()
return selection
def tip(self):
- "Return the latest revision in the repo."
- # FIXME: should return the current branch tip.
- return self.revlist[0]
+ "Return the tip revision of the current branch."
+ s = self.native_to_revno(self.current())
+ while True:
+ nxt = backend.succ(s, self)
+ if nxt is None:
+ return self.by_revno(s)
+ else:
+ s = nxt
def native_to_revno(self, revision):
"Map a native ID to a revno"
for item in self.revlist: