Commits

Angel Ezquerra  committed 35c5ed1

repowidget: do not switch to the commit widget qtip is selected unless it is the wd parent

You should/can only qrefresh the tipmost applied patch _if_ it is also the
workding directory parent!

  • Participants
  • Parent commits 65d4a51
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/repowidget.py

         if not cw.canswitch():
             return
         ctx = self.repo.changectx(rev)
-        if rev is None or ('mq' in self.repo.extensions() and 'qtip' in ctx.tags()):
-            # Clicking on working copy switches to commit tab
+        if rev is None or ('mq' in self.repo.extensions() and 'qtip' in ctx.tags()
+                           and self.repo['.'].rev() == rev):
+            # Clicking on working copy or on the topmost applied patch
+            # (_if_ it is also the working copy parent) switches to the commit tab
             tw.setCurrentIndex(self.commitTabIndex)
         else:
             # Clicking on a normal revision switches from commit tab