diff -r 9986ec0e559a -r 10516539f238 Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py --- a/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py Tue Oct 15 22:03:54 2013 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py Fri Oct 18 23:00:41 2013 +0200 @@ -59,8 +59,8 @@ self.__extensionMenuTitles = {} for extension in self.__extensions: - self.__extensionMenuTitles[self.__extensions[extension].menuTitle()] = \ - extension + self.__extensionMenuTitles[ + self.__extensions[extension].menuTitle()] = extension def setObjects(self, vcsObject, projectObject): """ @@ -100,7 +100,8 @@ """ self.vcsNewAct = E5Action(self.trUtf8('New from repository'), UI.PixmapCache.getIcon("vcsCheckout.png"), - self.trUtf8('&New from repository...'), 0, 0, self, 'mercurial_new') + self.trUtf8('&New from repository...'), 0, 0, + self, 'mercurial_new') self.vcsNewAct.setStatusTip(self.trUtf8( 'Create (clone) a new project from a Mercurial repository' )) @@ -121,7 +122,8 @@ )) self.hgIncomingAct.setWhatsThis(self.trUtf8( """<b>Show incoming log</b>""" - """<p>This shows the log of changes coming into the repository.</p>""" + """<p>This shows the log of changes coming into the""" + """ repository.</p>""" )) self.hgIncomingAct.triggered[()].connect(self.__hgIncoming) self.actions.append(self.hgIncomingAct) @@ -150,15 +152,17 @@ )) self.vcsUpdateAct.setWhatsThis(self.trUtf8( """<b>Update from repository</b>""" - """<p>This updates the local project from the Mercurial repository.</p>""" + """<p>This updates the local project from the Mercurial""" + """ repository.</p>""" )) self.vcsUpdateAct.triggered[()].connect(self._vcsUpdate) self.actions.append(self.vcsUpdateAct) - self.vcsCommitAct = E5Action(self.trUtf8('Commit changes to repository'), - UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('&Commit changes to repository...'), 0, 0, self, - 'mercurial_commit') + self.vcsCommitAct = E5Action( + self.trUtf8('Commit changes to repository'), + UI.PixmapCache.getIcon("vcsCommit.png"), + self.trUtf8('&Commit changes to repository...'), 0, 0, self, + 'mercurial_commit') self.vcsCommitAct.setStatusTip(self.trUtf8( 'Commit changes to the local project to the Mercurial repository' )) @@ -179,7 +183,8 @@ )) self.hgOutgoingAct.setWhatsThis(self.trUtf8( """<b>Show outgoing log</b>""" - """<p>This shows the log of changes outgoing out of the repository.</p>""" + """<p>This shows the log of changes outgoing out of the""" + """ repository.</p>""" )) self.hgOutgoingAct.triggered[()].connect(self.__hgOutgoing) self.actions.append(self.hgOutgoingAct) @@ -251,9 +256,9 @@ )) self.hgLogBrowserAct.setWhatsThis(self.trUtf8( """<b>Show log browser</b>""" - """<p>This shows a dialog to browse the log of the local project.""" - """ A limited number of entries is shown first. More can be""" - """ retrieved later on.</p>""" + """<p>This shows a dialog to browse the log of the local""" + """ project. A limited number of entries is shown first.""" + """ More can be retrieved later on.</p>""" )) self.hgLogBrowserAct.triggered[()].connect(self.__hgLogBrowser) self.actions.append(self.hgLogBrowserAct) @@ -267,7 +272,8 @@ )) self.vcsDiffAct.setWhatsThis(self.trUtf8( """<b>Show difference</b>""" - """<p>This shows the difference of the local project to the repository.</p>""" + """<p>This shows the difference of the local project to the""" + """ repository.</p>""" )) self.vcsDiffAct.triggered[()].connect(self._vcsDiff) self.actions.append(self.vcsDiffAct) @@ -281,7 +287,8 @@ )) self.hgExtDiffAct.setWhatsThis(self.trUtf8( """<b>Show difference (extended)</b>""" - """<p>This shows the difference of selectable revisions of the project.</p>""" + """<p>This shows the difference of selectable revisions of the""" + """ project.</p>""" )) self.hgExtDiffAct.triggered[()].connect(self.__hgExtendedDiff) self.actions.append(self.hgExtDiffAct) @@ -378,7 +385,8 @@ )) self.vcsMergeAct.setWhatsThis(self.trUtf8( """<b>Merge</b>""" - """<p>This merges changes of a revision into the local project.</p>""" + """<p>This merges changes of a revision into the local""" + """ project.</p>""" )) self.vcsMergeAct.triggered[()].connect(self._vcsMerge) self.actions.append(self.vcsMergeAct) @@ -391,7 +399,8 @@ )) self.vcsResolveAct.setWhatsThis(self.trUtf8( """<b>Conflicts resolved</b>""" - """<p>This marks all conflicts of the local project as resolved.</p>""" + """<p>This marks all conflicts of the local project as""" + """ resolved.</p>""" )) self.vcsResolveAct.triggered[()].connect(self.__hgResolve) self.actions.append(self.vcsResolveAct) @@ -455,7 +464,8 @@ self.trUtf8('Push new branch'), 0, 0, self, 'mercurial_push_branch') self.hgPushBranchAct.setStatusTip(self.trUtf8( - 'Push the current branch of the local project as a new named branch' + 'Push the current branch of the local project as a new named' + ' branch' )) self.hgPushBranchAct.setWhatsThis(self.trUtf8( """<b>Push new branch</b>""" @@ -500,7 +510,8 @@ )) self.vcsSwitchAct.setWhatsThis(self.trUtf8( """<b>Switch</b>""" - """<p>This switches the working directory to another revision.</p>""" + """<p>This switches the working directory to another""" + """ revision.</p>""" )) self.vcsSwitchAct.triggered[()].connect(self._vcsSwitch) self.actions.append(self.vcsSwitchAct) @@ -526,7 +537,8 @@ )) self.vcsCommandAct.setWhatsThis(self.trUtf8( """<b>Execute command</b>""" - """<p>This opens a dialog to enter an arbitrary Mercurial command.</p>""" + """<p>This opens a dialog to enter an arbitrary Mercurial""" + """ command.</p>""" )) self.vcsCommandAct.triggered[()].connect(self._vcsCommand) self.actions.append(self.vcsCommandAct) @@ -534,10 +546,12 @@ self.vcsPropsAct = E5Action(self.trUtf8('Command options'), self.trUtf8('Command &options...'), 0, 0, self, 'mercurial_options') - self.vcsPropsAct.setStatusTip(self.trUtf8('Show the Mercurial command options')) + self.vcsPropsAct.setStatusTip(self.trUtf8( + 'Show the Mercurial command options')) self.vcsPropsAct.setWhatsThis(self.trUtf8( """<b>Command options...</b>""" - """<p>This shows a dialog to edit the Mercurial command options.</p>""" + """<p>This shows a dialog to edit the Mercurial command""" + """ options.</p>""" )) self.vcsPropsAct.triggered[()].connect(self._vcsCommandOptions) self.actions.append(self.vcsPropsAct) @@ -550,14 +564,16 @@ )) self.hgConfigAct.setWhatsThis(self.trUtf8( """<b>Configure</b>""" - """<p>Show the configuration dialog with the Mercurial page selected.</p>""" + """<p>Show the configuration dialog with the Mercurial page""" + """ selected.</p>""" )) self.hgConfigAct.triggered[()].connect(self.__hgConfigure) self.actions.append(self.hgConfigAct) - self.hgEditUserConfigAct = E5Action(self.trUtf8('Edit user configuration'), - self.trUtf8('Edit user configuration...'), - 0, 0, self, 'mercurial_user_configure') + self.hgEditUserConfigAct = E5Action( + self.trUtf8('Edit user configuration'), + self.trUtf8('Edit user configuration...'), + 0, 0, self, 'mercurial_user_configure') self.hgEditUserConfigAct.setStatusTip(self.trUtf8( 'Show an editor to edit the user configuration file' )) @@ -568,15 +584,17 @@ self.hgEditUserConfigAct.triggered[()].connect(self.__hgEditUserConfig) self.actions.append(self.hgEditUserConfigAct) - self.hgRepoConfigAct = E5Action(self.trUtf8('Edit repository configuration'), - self.trUtf8('Edit repository configuration...'), - 0, 0, self, 'mercurial_repo_configure') + self.hgRepoConfigAct = E5Action( + self.trUtf8('Edit repository configuration'), + self.trUtf8('Edit repository configuration...'), + 0, 0, self, 'mercurial_repo_configure') self.hgRepoConfigAct.setStatusTip(self.trUtf8( 'Show an editor to edit the repository configuration file' )) self.hgRepoConfigAct.setWhatsThis(self.trUtf8( """<b>Edit repository configuration</b>""" - """<p>Show an editor to edit the repository configuration file.</p>""" + """<p>Show an editor to edit the repository configuration""" + """ file.</p>""" )) self.hgRepoConfigAct.triggered[()].connect(self.__hgEditRepoConfig) self.actions.append(self.hgRepoConfigAct) @@ -586,7 +604,8 @@ self.trUtf8('Show combined configuration settings...'), 0, 0, self, 'mercurial_show_config') self.hgShowConfigAct.setStatusTip(self.trUtf8( - 'Show the combined configuration settings from all configuration files' + 'Show the combined configuration settings from all configuration' + ' files' )) self.hgShowConfigAct.setWhatsThis(self.trUtf8( """<b>Show combined configuration settings</b>""" @@ -669,8 +688,8 @@ )) self.hgBundleAct.setWhatsThis(self.trUtf8( """<b>Create changegroup</b>""" - """<p>This creates a changegroup file collecting selected changesets""" - """ (hg bundle).</p>""" + """<p>This creates a changegroup file collecting selected""" + """ changesets (hg bundle).</p>""" )) self.hgBundleAct.triggered[()].connect(self.__hgBundle) self.actions.append(self.hgBundleAct) @@ -683,22 +702,23 @@ )) self.hgPreviewBundleAct.setWhatsThis(self.trUtf8( """<b>Preview changegroup</b>""" - """<p>This previews a changegroup file containing a collection of""" - """ changesets.</p>""" + """<p>This previews a changegroup file containing a collection""" + """ of changesets.</p>""" )) self.hgPreviewBundleAct.triggered[()].connect(self.__hgPreviewBundle) self.actions.append(self.hgPreviewBundleAct) - self.hgIdentifyBundleAct = E5Action(self.trUtf8('Identify changegroup'), - self.trUtf8('Identify changegroup...'), - 0, 0, self, 'mercurial_identify_bundle') + self.hgIdentifyBundleAct = E5Action( + self.trUtf8('Identify changegroup'), + self.trUtf8('Identify changegroup...'), + 0, 0, self, 'mercurial_identify_bundle') self.hgIdentifyBundleAct.setStatusTip(self.trUtf8( 'Identify a changegroup file containing a collection of changesets' )) self.hgIdentifyBundleAct.setWhatsThis(self.trUtf8( """<b>Identify changegroup</b>""" - """<p>This identifies a changegroup file containing a collection of""" - """ changesets.</p>""" + """<p>This identifies a changegroup file containing a""" + """ collection of changesets.</p>""" )) self.hgIdentifyBundleAct.triggered[()].connect(self.__hgIdentifyBundle) self.actions.append(self.hgIdentifyBundleAct) @@ -790,19 +810,20 @@ )) self.hgRollbackAct.setWhatsThis(self.trUtf8( """<b>Rollback last transaction</b>""" - """<p>This performs a rollback of the last transaction. Transactions""" - """ are used to encapsulate the effects of all commands that create new""" - """ changesets or propagate existing changesets into a repository.""" - """ For example, the following commands are transactional, and""" - """ their effects can be rolled back:<ul>""" + """<p>This performs a rollback of the last transaction.""" + """ Transactions are used to encapsulate the effects of all""" + """ commands that create new changesets or propagate existing""" + """ changesets into a repository. For example, the following""" + """ commands are transactional, and their effects can be""" + """ rolled back:<ul>""" """<li>commit</li>""" """<li>import</li>""" """<li>pull</li>""" """<li>push (with this repository as the destination)</li>""" """<li>unbundle</li>""" """</ul>""" - """</p><p><strong>This command is dangerous. Please use with care.""" - """</strong></p>""" + """</p><p><strong>This command is dangerous. Please use with""" + """ care. </strong></p>""" )) self.hgRollbackAct.triggered[()].connect(self.__hgRollback) self.actions.append(self.hgRollbackAct) @@ -828,7 +849,8 @@ )) self.hgImportAct.setWhatsThis(self.trUtf8( """<b>Import Patch</b>""" - """<p>This imports a patch from a patch file into the project.</p>""" + """<p>This imports a patch from a patch file into the""" + """ project.</p>""" )) self.hgImportAct.triggered[()].connect(self.__hgImport) self.actions.append(self.hgImportAct) @@ -869,8 +891,8 @@ self.hgGraftAct.setWhatsThis(self.trUtf8( """<b>Copy Changesets</b>""" """<p>This copies changesets from another branch on top of the""" - """ current working directory with the user, date and description""" - """ of the original changeset.</p>""" + """ current working directory with the user, date and""" + """ description of the original changeset.</p>""" )) self.hgGraftAct.triggered[()].connect(self.__hgGraft) self.actions.append(self.hgGraftAct) @@ -884,8 +906,8 @@ )) self.hgGraftContinueAct.setWhatsThis(self.trUtf8( """<b>Continue Copying Session</b>""" - """<p>This continues the last copying session after conflicts were""" - """ resolved.</p>""" + """<p>This continues the last copying session after conflicts""" + """ were resolved.</p>""" )) self.hgGraftContinueAct.triggered[()].connect(self.__hgGraftContinue) self.actions.append(self.hgGraftContinueAct) @@ -917,7 +939,8 @@ """<b>Remove...</b>""" """<p>Remove sub-repositories from the project.</p>""" )) - self.hgRemoveSubreposAct.triggered[()].connect(self.__hgRemoveSubrepositories) + self.hgRemoveSubreposAct.triggered[()].connect( + self.__hgRemoveSubrepositories) self.actions.append(self.hgRemoveSubreposAct) self.hgArchiveAct = E5Action(self.trUtf8('Create unversioned archive'), @@ -929,7 +952,8 @@ )) self.hgArchiveAct.setWhatsThis(self.trUtf8( """<b>Create unversioned archive...</b>""" - """<p>This creates an unversioned archive from the repository.</p>""" + """<p>This creates an unversioned archive from the""" + """ repository.</p>""" )) self.hgArchiveAct.triggered[()].connect(self.__hgArchive) self.actions.append(self.hgArchiveAct) @@ -1005,7 +1029,8 @@ for extensionMenuTitle in sorted(self.__extensionMenuTitles): extensionName = self.__extensionMenuTitles[extensionMenuTitle] self.extensionMenus[extensionName] = self.__extensionsMenu.addMenu( - self.__extensions[extensionName].initMenu(self.__extensionsMenu)) + self.__extensions[extensionName].initMenu( + self.__extensionsMenu)) self.vcs.activeExtensionsChanged.connect(self.__showExtensionMenu) if self.vcs.version >= (2, 0): @@ -1027,7 +1052,8 @@ act = menu.addAction( UI.PixmapCache.getIcon( - os.path.join("VcsPlugins", "vcsMercurial", "icons", "mercurial.png")), + os.path.join("VcsPlugins", "vcsMercurial", "icons", + "mercurial.png")), self.vcs.vcsName(), self._vcsInfoDisplay) font = act.font() font.setBold(True) @@ -1124,7 +1150,8 @@ self.extensionMenus[extensionName].setEnabled( self.vcs.isExtensionActive(extensionName)) if not self.extensionMenus[extensionName].isEnabled() and \ - self.extensionMenus[extensionName].menu().isTearOffMenuVisible(): + self.extensionMenus[extensionName].menu()\ + .isTearOffMenuVisible(): self.extensionMenus[extensionName].menu().hideTearOffMenu() def __hgExtendedDiff(self): @@ -1141,13 +1168,15 @@ def __hgIncoming(self): """ - Private slot used to show the log of changes coming into the repository. + Private slot used to show the log of changes coming into the + repository. """ self.vcs.hgIncoming(self.project.ppath) def __hgOutgoing(self): """ - Private slot used to show the log of changes going out of the repository. + Private slot used to show the log of changes going out of the + repository. """ self.vcs.hgOutgoing(self.project.ppath)