Commits

Steve Borho committed fdb26e3

revdetails: jump to tip if previous current revision has been stripped

Do not jump to tip if current revision is a patch or the working copy

  • Participants
  • Parent commits 725f4d8
  • Branches stable

Comments (0)

Files changed (2)

File tortoisehg/hgqt/repowidget.py

 
     def rebuildGraph(self):
         self.showMessage('')
-        if self.rev is None or len(self.repo) > self.rev:
+        if type(self.rev) is not int or len(self.repo) > self.rev:
             self._reload_rev = self.rev
         else:
             self._reload_rev = 'tip'

File tortoisehg/hgqt/revdetails.py

 
     def reload(self):
         'Task tab is reloaded, or repowidget is refreshed'
-        if len(self.repo) <= self._last_rev:
-            self._last_rev = '.'
+        if type(self._last_rev) is int and len(self.repo) <= self._last_rev:
+            self._last_rev = 'tip'
         f = self.filelist.currentFile()
         self.revision_selected(self._last_rev)
         self.filelist.selectFile(f)