Commits

Steve Borho committed 433ddbe

changest: prevent index errors in get_title()

opts['rev'] can be a list or a string because of the baggage
we're carrying in this file. This should be fixed properly in 0.9.

  • Participants
  • Parent commits dd42f30

Comments (0)

Files changed (1)

File hggtk/changeset.py

 
     def get_title(self):
         title = toutf(os.path.basename(self.repo.root)) + ' changeset '
-        title += self.opts['rev'][0]
+        rev = self.opts['rev']
+        if isinstance(rev, str):
+            title += rev
+        else:
+            title += rev[0]
         return title
 
     def get_icon(self):