Fri, 23 Aug 2019 13:06:04 +0200
Fixed a few code style issues.
eric6/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py | file | annotate | diff | comparison | revisions | |
eric6/Plugins/VcsPlugins/vcsMercurial/hg.py | file | annotate | diff | comparison | revisions |
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py Fri Aug 23 12:44:37 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py Fri Aug 23 13:06:04 2019 +0200 @@ -425,11 +425,11 @@ 0, 0, self, 'mercurial_commit_merge') self.hgCommitMergeAct.setStatusTip(self.tr( 'Commit a merge.' - )) + )) self.hgCommitMergeAct.setWhatsThis(self.tr( """<b>Commit a merge</b>""" """<p>This commits a merge working directory</p>""" - )) + )) self.hgCommitMergeAct.triggered.connect(self.__hgCommitMerge) self.actions.append(self.hgCommitMergeAct)
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py Fri Aug 23 12:44:37 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py Fri Aug 23 13:06:04 2019 +0200 @@ -417,7 +417,7 @@ # call CommitDialog and get message from there if self.__commitDialog is None: from .HgCommitDialog import HgCommitDialog - self.__commitDialog = HgCommitDialog(self, msg, mq, merge, + self.__commitDialog = HgCommitDialog(self, msg, mq, merge, self.__ui) self.__commitDialog.accepted.connect(self.__vcsCommit_Step2) self.__commitDialog.show() @@ -3363,11 +3363,13 @@ def canCommitMerge(self, name): """ - Public method to check if the working directory is uncommitted merge. + Public method to check, if the working directory is an uncommitted + merge. - @param name file/directory name (string) - - @return flag indicating commit merge capability (boolean) + @param name file/directory name + @type str + @return flag indicating commit merge capability + @rtype bool """ dname, fname = self.splitPath(name) @@ -3376,7 +3378,7 @@ while not os.path.isdir(os.path.join(repodir, self.adminDir)): repodir = os.path.dirname(repodir) if os.path.splitdrive(repodir)[1] == os.sep: - return + return False args = self.initCommand("identify") @@ -3394,10 +3396,7 @@ else: output, error = self.__client.runcommand(args) - if output.count('+') == 2: - return True - else: - return False + return output.count('+') == 2 def canPull(self): """