Yuya Nishihara  committed a24e5d1

commit: refresh working-directory status and message according to change flags

repositoryChanged() is equivalent to LogChanged | WorkingParentChanged, but
CommitWidget does not need LogChanged notification.

  • Participants
  • Parent commits 797fb54

Comments (0)

Files changed (1)

File tortoisehg/hgqt/

 from tortoisehg.util.i18n import _
 from tortoisehg.hgqt.messageentry import MessageEntry
-from tortoisehg.hgqt import cmdcore, cmdui
+from tortoisehg.hgqt import cmdcore, cmdui, thgrepo
 from tortoisehg.hgqt import qtlib, qscilib, status, branchop, revpanel
 from tortoisehg.hgqt import hgrcutil, lfprompt
-    @pyqtSlot()
-    def repositoryChanged(self):
-        'Repository has detected a changelog / dirstate change'
+    @pyqtSlot(int)
+    def repositoryChanged(self, flags):
+        if flags & thgrepo.WorkingParentChanged:
+            self._refreshWorkingState()
+    def _refreshWorkingState(self):
         curraction = self.mqgroup.checkedAction()
         if curraction._name == 'commit' and not self.msgte.isModified():
             # default merge or close-branch message is outdated if new commit