]> thyrsus.com Git - src.git/commitdiff
Make a function slightly more general.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 12 Nov 2014 22:44:32 +0000 (17:44 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 12 Nov 2014 22:44:32 +0000 (17:44 -0500)
src

diff --git a/src b/src
index 4b67786add62d64c4d02d9f1ed59446a7a7b5b47..fdee1335eb296a44ea7382eece00fe8540d73e30 100755 (executable)
--- a/src
+++ b/src
@@ -221,9 +221,11 @@ class History:
         if reversed:
             selection.reverse()
         return selection
-    def tip(self):
-        "Return the tip revision of the current branch."
-        s = self.native_to_revno(self.current())
+    def tip(self, rev=None):
+        "Return the tip revision of the branch of the given native revision."
+        if rev is None:
+            rev = self.current()
+        s = self.native_to_revno(rev)
         while True:
             rev = self.revno_to_native(s)
             rev = backend.succ(rev)