Commits

Yuya Nishihara  committed 6f8592a Merge

Merge with stable

  • Participants
  • Parent commits 2873445, 4d449fc

Comments (0)

Files changed (4)

File tortoisehg/hgqt/commit.py

         else:
             merge = False
             self.files = self.stwidget.getChecked('MAR?!S')
-        if not (self.files or brcmd or newbranch or merge):
+        if not (self.files or brcmd or newbranch or amend or merge):
             qtlib.WarningMsgBox(_('No files checked'),
                                 _('No modified files checkmarked for commit'),
                                 parent=self)
         if amend:
             cmdline.append('--amend')
 
-        if not self.files and (brcmd or newbranch) and not merge:
+        if not self.files and (brcmd or newbranch or amend) and not merge:
             # make sure to commit empty changeset by excluding all files
             cmdline.extend(['--exclude', repo.root])
 

File tortoisehg/hgqt/rename.py

                 caption = _('Select Destination Folder')
         FD = QFileDialog
         if os.path.isfile(curr):
-            path = FD.getOpenFileName(parent=self, caption=caption,
-                    options=FD.ReadOnly)
+            if mode == 'src':
+                path = FD.getOpenFileName(parent=self, caption=caption,
+                                          options=FD.ReadOnly)
+            else:
+                path = FD.getSaveFileName(parent=self, caption=caption,
+                                          options=FD.ReadOnly)
         else:
             path = FD.getExistingDirectory(parent=self, caption=caption,
                     options=FD.ShowDirsOnly | FD.ReadOnly)

File tortoisehg/hgqt/reporegistry.py

                 repotype = 'unknown'
         if repotype == 'hg':
             if groupname:
-                self.addRepo(hglib.tounicode(root), groupname)
+                self.addRepo(root, groupname)
             self.openRepo.emit(hglib.tounicode(root), False)
         else:
             qtlib.WarningMsgBox(

File tortoisehg/hgqt/workbench.py

 import os
 import sys
 import getpass # used to get the username on the workbench server
-from mercurial import ui
+from mercurial import ui, util
 from mercurial.error import RepoError
 from tortoisehg.util import paths, hglib
 
 
     def _findrepowidget(self, root):
         """Iterates RepoWidget for the specified root"""
+        def normpathandcase(path):
+            return os.path.normcase(util.normpath(path))
         tw = self.repoTabsWidget
         for idx in range(tw.count()):
             rw = tw.widget(idx)
-            if rw.repo.root == root:
+            if normpathandcase(rw.repo.root) == normpathandcase(root):
                 yield rw
 
     def onAbout(self, *args):