Commits

Steve Borho  committed 4a9ebd3 Merge

Merge with stable

  • Participants
  • Parent commits 7270e8c, bf6e69b

Comments (0)

Files changed (4)

File tortoisehg/hgqt/commit.py

         else:
             if self.lastAction in ('qref', 'amend'):
                 self.setMessage(self.lastCommitMsg)
+        if curraction == 'amend':
+            self.stwidget.defcheck = 'amend'
+        else:
+            self.stwidget.defcheck = 'commit'
         self.stwidget.fileview.enableChangeSelection(allowcs)
         if not allowcs:
             self.stwidget.partials = {}

File tortoisehg/hgqt/repowidget.py

 
     def pullBundleToRev(self):
         if self.bundle:
+            # manually remove infobar to work around unwanted rejectBundle
+            # during pull operation (issue #2596)
+            if self._activeInfoBar:
+                self._activeInfoBar.hide()
+                self._freeInfoBar()
+
             self.taskTabsWidget.setCurrentIndex(self.syncTabIndex)
             self.syncDemand.pullBundle(self.bundle, self.rev,
                                        self.bundlesource)

File tortoisehg/hgqt/status.py

     runCustomCommandRequested = pyqtSignal(str, list)
 
     def __init__(self, repo, pats, opts, parent=None, checkable=True,
-                 defcheck='MAR!S'):
+                 defcheck='commit'):
         QWidget.__init__(self, parent)
 
         self.opts = dict(modified=True, added=True, removed=True, deleted=True,
         self.split = split
         self.diffvbox = vbox
 
+    @property
+    def defcheck(self):
+        if self._defcheck is None:
+            return 'MAR!S'
+        return self._defcheck
+
+    @defcheck.setter
+    def defcheck(self, newdefcheck):
+        if newdefcheck.lower() == 'amend':
+            newdefcheck = 'MAS'
+        elif newdefcheck.lower() in ('commit', 'qnew', 'qrefresh'):
+            newdefcheck = 'MAR!S'
+        self._defcheck = newdefcheck
+
     def checkAllNone(self):
         if self.manualCheckAllUpdate:
             return

File tortoisehg/hgqt/workbench.py

 
         self.actionGroupTaskView = QActionGroup(self)
         self.actionGroupTaskView.triggered.connect(self.onSwitchRepoTaskTab)
-        def addtaskview(icon, label, name):
+        def addtaskview(icon, label, name, shortcut=None):
             a = newaction(label, icon=None, checkable=True, data=name,
                           enabled='repoopen', menu='view')
             a.setIcon(qtlib.geticon(icon))
+            if shortcut:
+                a.setShortcut(shortcut)
             self.actionGroupTaskView.addAction(a)
             self.tasktbar.addAction(a)
             return a
         self.actionSelectTaskMQ = None
         self.actionSelectTaskPbranch = None
 
-        for taskname in tasklist:
+        for i, taskname in enumerate(tasklist):
             taskname = taskname.strip()
             taskinfo = taskdefs.get(taskname, None)
             if taskinfo is None:
                 newseparator(toolbar='task')
                 continue
-            tbar = addtaskview(taskinfo[0], taskinfo[1], taskname)
+            tbar = addtaskview(taskinfo[0], taskinfo[1], taskname,
+                               "Alt+%d" % (i + 1))
             if taskname == 'mq':
                 self.actionSelectTaskMQ = tbar
             elif taskname == 'pbranch':
         menu = QMenu(_('&Workbench Toolbars'), self)
         menu.addAction(self.edittbar.toggleViewAction())
         menu.addAction(self.docktbar.toggleViewAction())
+        menu.addAction(self.tasktbar.toggleViewAction())
         menu.addAction(self.synctbar.toggleViewAction())
-        menu.addAction(self.tasktbar.toggleViewAction())
         menu.addAction(self.customtbar.toggleViewAction())
         self.menuView.addMenu(menu)