]> thyrsus.com Git - src.git/commitdiff
Another move away from using natve IDs internally.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 15 Nov 2014 12:52:39 +0000 (07:52 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 15 Nov 2014 12:52:39 +0000 (07:52 -0500)
src

diff --git a/src b/src
index 937b4aaf8dcfca695e70959785e156973da6402c..b4bd39a88809258043079941377c698cd5b551bb 100755 (executable)
--- a/src
+++ b/src
@@ -163,7 +163,7 @@ class HistoryEntry:
         self.child = None
         self.branches = set([])
     def selected(self):
-        return self.native == self.history.current()
+        return self == self.history.current()
     def unixtime(self):
         try:
             return calendar.timegm(time.strptime(self.date, "%Y-%m-%dT%H:%M:%SZ"))
@@ -208,14 +208,14 @@ class History:
     def current(self):
         "Return the revision currently checked out."
         try:
-            return self.lockrevs[0]
+            return self.by_native_d[self.lockrevs[0]]
         except IndexError:
             croak("no current revision? src checkout to recover")
     def current_branch(self, backwards=False):
         "Return a list of items that are descendants or ancestors of current."
         if debug >= DEBUG_SEQUENCE:
-            print "current_branch(%s)" % self.current()
-        p = s = self.native_to_revno(self.current())
+            print "current_branch(%s)" % self.current().native
+        p = s = self.current().revno
         selection = [self.by_revno(p)]
         while True:
             rev = self.revno_to_native(p)
@@ -237,7 +237,7 @@ class History:
     def tip(self, rev=None):
         "Return the tip revision of the branch of the given native revision."
         if rev is None:
-            rev = self.current()
+            rev = self.current().native
         s = self.by_native_d[rev]
         while True:
             if s.child == None: