Commits

Yuya Nishihara committed 23573a2 Merge

Merge with stable

Comments (0)

Files changed (5)

icons/16x16/mimetypes/text-x-generic.png

Added
New image

tortoisehg/hgqt/commit.py

             return
 
         if not msg:
-            qtlib.WarningMsgBox(_('Nothing Commited'),
+            qtlib.WarningMsgBox(_('Nothing Committed'),
                                 _('Please enter commit message'),
                                 parent=self)
             self.msgte.setFocus()
             if issueregex:
                 m = re.search(issueregex, msg)
                 if not m:
-                    qtlib.WarningMsgBox(_('Nothing Commited'),
+                    qtlib.WarningMsgBox(_('Nothing Committed'),
                                         _('No issue link was found in the '
                                           'commit message.  The commit message '
                                           'should contain an issue link.  '
                 if self.currentAction == 'commit':
                     shlib.shell_notify(self.files)
                     self.commitComplete.emit()
+        elif ret == 1 and self.currentAction in ('amend', 'commit'):
+            qtlib.WarningMsgBox(_('Nothing Committed'),
+                                _('Nothing changed.'),
+                                parent=self)
         else:
             cmdui.errorMessageBox(self._cmdsession, self,
                                   _('Commit', 'window title'))

tortoisehg/hgqt/manifestmodel.py

         elif e.isdir:
             ic = self._fileiconprovider.icon(QFileIconProvider.Folder)
         else:
-            # assumes file still exists in wdir; otherwise falls back to default
-            info = QFileInfo(os.path.join(self._repoagent.rootPath(), e.path))
-            ic = self._fileiconprovider.icon(info)
-            if ic.isNull():
-                ic = self._fileiconprovider.icon(QFileIconProvider.File)
+            # do not use fileiconprovier.icon(fileinfo), which may return icon
+            # with shell (i.e. status of working directory) overlay.
+            # default file icon looks ugly with status overlay on Windows
+            ic = qtlib.geticon('text-x-generic')
 
         if not e.status:
             return ic

tortoisehg/hgqt/qtlib.py

                         (QSize(), 'scalable/apps', '.svg'),
                         (QSize(), 'scalable/status', '.svg'),
                         (QSize(16, 16), '16x16/apps', '.png'),
+                        (QSize(16, 16), '16x16/mimetypes', '.png'),
                         (QSize(22, 22), '22x22/actions', '.png'),
                         (QSize(32, 32), '32x32/actions', '.png'),
                         (QSize(24, 24), '24x24/actions', '.png')]

tortoisehg/hgqt/wctxactions.py

         cwd = os.getcwd()
         try:
             os.chdir(repo.root)
+            # cwd is a propertycache since hg e40520642e64
+            # TODO: runCommand() in place of calling command function directly
+            if '_cwd' in repo.dirstate.__dict__:
+                delattr(repo.dirstate, '_cwd')
             try:
                 # All operations should quietly succeed.  Any error should
                 # result in a message box
                 QMessageBox.critical(parent, name + _(' Aborted'), err)
         finally:
             os.chdir(cwd)
+            if '_cwd' in repo.dirstate.__dict__:
+                delattr(repo.dirstate, '_cwd')
 
         if notify:
             self.refreshNeeded.emit()