Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2847
1843ef6e2656
parent 3008
7848489bcb92
child 3058
0a02c433f52d
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py	Fri Oct 18 23:00:41 2013 +0200
@@ -41,8 +41,8 @@
         ))
         self.hgQueueInitAct.setWhatsThis(self.trUtf8(
             """<b>Init Queue Repository</b>"""
-            """<p>This initializes a new versioned queue repository inside the"""
-            """ current repository.</p>"""
+            """<p>This initializes a new versioned queue repository inside"""
+            """ the current repository.</p>"""
         ))
         self.hgQueueInitAct.triggered[()].connect(self.__hgQueueInit)
         self.actions.append(self.hgQueueInitAct)
@@ -84,7 +84,8 @@
             """<b>Update Current Patch</b>"""
             """<p>This updates the current patch.</p>"""
         ))
-        self.hgQueueRefreshAct.triggered[()].connect(self.__hgQueueRefreshPatch)
+        self.hgQueueRefreshAct.triggered[()].connect(
+            self.__hgQueueRefreshPatch)
         self.actions.append(self.hgQueueRefreshAct)
         
         self.hgQueueRefreshMessageAct = E5Action(
@@ -96,8 +97,8 @@
         ))
         self.hgQueueRefreshMessageAct.setWhatsThis(self.trUtf8(
             """<b>Update Current Patch (with Message)</b>"""
-            """<p>This updates the current patch after giving the chance to change"""
-            """ the current commit message.</p>"""
+            """<p>This updates the current patch after giving the chance"""
+            """ to change the current commit message.</p>"""
         ))
         self.hgQueueRefreshMessageAct.triggered[()].connect(
             self.__hgQueueRefreshPatchMessage)
@@ -155,7 +156,8 @@
             """<p>This finishes the applied patches by moving them out of"""
             """ mq control into regular repository history.</p>"""
         ))
-        self.hgQueueFinishAct.triggered[()].connect(self.__hgQueueFinishAppliedPatches)
+        self.hgQueueFinishAct.triggered[()].connect(
+            self.__hgQueueFinishAppliedPatches)
         self.actions.append(self.hgQueueFinishAct)
         
         self.hgQueueRenameAct = E5Action(self.trUtf8('Rename Patch'),
@@ -194,7 +196,8 @@
             """<b>Fold Patches</b>"""
             """<p>This folds unapplied patches into the current patch.</p>"""
         ))
-        self.hgQueueFoldAct.triggered[()].connect(self.__hgQueueFoldUnappliedPatches)
+        self.hgQueueFoldAct.triggered[()].connect(
+            self.__hgQueueFoldUnappliedPatches)
         self.actions.append(self.hgQueueFoldAct)
         
         self.hgQueueStatusAct = E5Action(self.trUtf8('Show Status'),
@@ -227,7 +230,8 @@
         ))
         self.hgQueuePushAct.setWhatsThis(self.trUtf8(
             """<b>Push Next Patch</b>"""
-            """<p>This pushes the next patch onto the stack of applied patches.</p>"""
+            """<p>This pushes the next patch onto the stack of applied"""
+            """ patches.</p>"""
         ))
         self.hgQueuePushAct.triggered[()].connect(self.__hgQueuePushPatch)
         self.actions.append(self.hgQueuePushAct)
@@ -240,9 +244,11 @@
         ))
         self.hgQueuePushAllAct.setWhatsThis(self.trUtf8(
             """<b>Push All Patches</b>"""
-            """<p>This pushes all patches onto the stack of applied patches.</p>"""
+            """<p>This pushes all patches onto the stack of applied"""
+            """ patches.</p>"""
         ))
-        self.hgQueuePushAllAct.triggered[()].connect(self.__hgQueuePushAllPatches)
+        self.hgQueuePushAllAct.triggered[()].connect(
+            self.__hgQueuePushAllPatches)
         self.actions.append(self.hgQueuePushAllAct)
         
         self.hgQueuePushUntilAct = E5Action(self.trUtf8('Push Patches'),
@@ -253,10 +259,11 @@
         ))
         self.hgQueuePushUntilAct.setWhatsThis(self.trUtf8(
             """<b>Push Patches</b>"""
-            """<p>This pushes patches onto the stack of applied patches until"""
-            """ a named patch is at the top of the stack.</p>"""
+            """<p>This pushes patches onto the stack of applied patches"""
+            """ until a named patch is at the top of the stack.</p>"""
         ))
-        self.hgQueuePushUntilAct.triggered[()].connect(self.__hgQueuePushPatches)
+        self.hgQueuePushUntilAct.triggered[()].connect(
+            self.__hgQueuePushPatches)
         self.actions.append(self.hgQueuePushUntilAct)
         
         self.hgQueuePopAct = E5Action(self.trUtf8('Pop Current Patch'),
@@ -267,7 +274,8 @@
         ))
         self.hgQueuePopAct.setWhatsThis(self.trUtf8(
             """<b>Pop Current Patch</b>"""
-            """<p>This pops the current patch off the stack of applied patches.</p>"""
+            """<p>This pops the current patch off the stack of applied"""
+            """ patches.</p>"""
         ))
         self.hgQueuePopAct.triggered[()].connect(self.__hgQueuePopPatch)
         self.actions.append(self.hgQueuePopAct)
@@ -280,9 +288,11 @@
         ))
         self.hgQueuePopAllAct.setWhatsThis(self.trUtf8(
             """<b>Pop All Patches</b>"""
-            """<p>This pops all patches off the stack of applied patches.</p>"""
+            """<p>This pops all patches off the stack of applied"""
+            """ patches.</p>"""
         ))
-        self.hgQueuePopAllAct.triggered[()].connect(self.__hgQueuePopAllPatches)
+        self.hgQueuePopAllAct.triggered[()].connect(
+            self.__hgQueuePopAllPatches)
         self.actions.append(self.hgQueuePopAllAct)
         
         self.hgQueuePopUntilAct = E5Action(self.trUtf8('Pop Patches'),
@@ -293,8 +303,8 @@
         ))
         self.hgQueuePopUntilAct.setWhatsThis(self.trUtf8(
             """<b>Pop Patches</b>"""
-            """<p>This pops patches off the stack of applied patches until a named"""
-            """ patch is at the top of the stack.</p>"""
+            """<p>This pops patches off the stack of applied patches"""
+            """ until a named patch is at the top of the stack.</p>"""
         ))
         self.hgQueuePopUntilAct.triggered[()].connect(self.__hgQueuePopPatches)
         self.actions.append(self.hgQueuePopUntilAct)
@@ -325,10 +335,11 @@
         ))
         self.hgQueuePushForceAct.setWhatsThis(self.trUtf8(
             """<b>Push Next Patch</b>"""
-            """<p>This pushes the next patch onto the stack of applied patches"""
-            """ on top of local changes.</p>"""
+            """<p>This pushes the next patch onto the stack of applied"""
+            """ patches on top of local changes.</p>"""
         ))
-        self.hgQueuePushForceAct.triggered[()].connect(self.__hgQueuePushPatchForced)
+        self.hgQueuePushForceAct.triggered[()].connect(
+            self.__hgQueuePushPatchForced)
         self.actions.append(self.hgQueuePushForceAct)
         
         self.hgQueuePushAllForceAct = E5Action(self.trUtf8('Push All Patches'),
@@ -354,8 +365,9 @@
         ))
         self.hgQueuePushUntilForceAct.setWhatsThis(self.trUtf8(
             """<b>Push Patches</b>"""
-            """<p>This pushes patches onto the stack  of applied patches until"""
-            """ a named patch is at the top of the stack on top of local changes.</p>"""
+            """<p>This pushes patches onto the stack  of applied patches"""
+            """ until a named patch is at the top of the stack on top of"""
+            """ local changes.</p>"""
         ))
         self.hgQueuePushUntilForceAct.triggered[()].connect(
             self.__hgQueuePushPatchesForced)
@@ -369,10 +381,12 @@
         ))
         self.hgQueuePopForceAct.setWhatsThis(self.trUtf8(
             """<b>Pop Current Patch</b>"""
-            """<p>This pops the current patch off the stack of applied patches"""
+            """<p>This pops the current patch off the stack of applied"""
+            """ patches"""
             """ forgetting local changes.</p>"""
         ))
-        self.hgQueuePopForceAct.triggered[()].connect(self.__hgQueuePopPatchForced)
+        self.hgQueuePopForceAct.triggered[()].connect(
+            self.__hgQueuePopPatchForced)
         self.actions.append(self.hgQueuePopForceAct)
         
         self.hgQueuePopAllForceAct = E5Action(self.trUtf8('Pop All Patches'),
@@ -398,25 +412,28 @@
         ))
         self.hgQueuePopUntilForceAct.setWhatsThis(self.trUtf8(
             """<b>Pop Patches</b>"""
-            """<p>This pops patches off the stack of applied patches until a named"""
-            """ patch is at the top of the stack forgetting local changes.</p>"""
+            """<p>This pops patches off the stack of applied patches until"""
+            """ a named patch is at the top of the stack forgetting local"""
+            """ changes.</p>"""
         ))
-        self.hgQueuePopUntilForceAct.triggered[()].connect(self.__hgQueuePopPatchesForced)
+        self.hgQueuePopUntilForceAct.triggered[()].connect(
+            self.__hgQueuePopPatchesForced)
         self.actions.append(self.hgQueuePopUntilForceAct)
         
         self.hgQueueGotoForceAct = E5Action(self.trUtf8('Go to Patch'),
                 self.trUtf8('Go to Patch'),
                 0, 0, self, 'mercurial_queues_goto_force')
         self.hgQueueGotoForceAct.setStatusTip(self.trUtf8(
-            'Push or pop patches until named patch is at top of stack overwriting'
-            ' any local changes'
+            'Push or pop patches until named patch is at top of stack'
+            ' overwriting any local changes'
         ))
         self.hgQueueGotoForceAct.setWhatsThis(self.trUtf8(
             """<b>Go to Patch</b>"""
             """<p>This pushes or pops patches until a named patch is at the"""
             """ top of the stack overwriting any local changes.</p>"""
         ))
-        self.hgQueueGotoForceAct.triggered[()].connect(self.__hgQueueGotoPatchForced)
+        self.hgQueueGotoForceAct.triggered[()].connect(
+            self.__hgQueueGotoPatchForced)
         self.actions.append(self.hgQueueGotoForceAct)
     
     def __initGuardsActions(self):
@@ -434,7 +451,8 @@
             """<p>This opens a dialog to define guards for the current"""
             """ or a named patch.</p>"""
         ))
-        self.hgQueueDefineGuardsAct.triggered[()].connect(self.__hgQueueGuardsDefine)
+        self.hgQueueDefineGuardsAct.triggered[()].connect(
+            self.__hgQueueGuardsDefine)
         self.actions.append(self.hgQueueDefineGuardsAct)
         
         self.hgQueueDropAllGuardsAct = E5Action(self.trUtf8('Drop All Guards'),
@@ -447,7 +465,8 @@
             """<b>Drop All Guards</b>"""
             """<p>This drops all guards of the current or a named patch.</p>"""
         ))
-        self.hgQueueDropAllGuardsAct.triggered[()].connect(self.__hgQueueGuardsDropAll)
+        self.hgQueueDropAllGuardsAct.triggered[()].connect(
+            self.__hgQueueGuardsDropAll)
         self.actions.append(self.hgQueueDropAllGuardsAct)
         
         self.hgQueueListGuardsAct = E5Action(self.trUtf8('List Guards'),
@@ -460,7 +479,8 @@
             """<b>List Guards</b>"""
             """<p>This lists the guards of the current or a named patch.</p>"""
         ))
-        self.hgQueueListGuardsAct.triggered[()].connect(self.__hgQueueGuardsList)
+        self.hgQueueListGuardsAct.triggered[()].connect(
+            self.__hgQueueGuardsList)
         self.actions.append(self.hgQueueListGuardsAct)
         
         self.hgQueueListAllGuardsAct = E5Action(self.trUtf8('List All Guards'),
@@ -473,12 +493,14 @@
             """<b>List All Guards</b>"""
             """<p>This lists all guards of all patches.</p>"""
         ))
-        self.hgQueueListAllGuardsAct.triggered[()].connect(self.__hgQueueGuardsListAll)
+        self.hgQueueListAllGuardsAct.triggered[()].connect(
+            self.__hgQueueGuardsListAll)
         self.actions.append(self.hgQueueListAllGuardsAct)
         
-        self.hgQueueActivateGuardsAct = E5Action(self.trUtf8('Set Active Guards'),
-                self.trUtf8('Set Active Guards...'),
-                0, 0, self, 'mercurial_queues_guards_set_active')
+        self.hgQueueActivateGuardsAct = E5Action(
+            self.trUtf8('Set Active Guards'),
+            self.trUtf8('Set Active Guards...'),
+            0, 0, self, 'mercurial_queues_guards_set_active')
         self.hgQueueActivateGuardsAct.setStatusTip(self.trUtf8(
             'Set the list of active guards'
         ))
@@ -486,12 +508,14 @@
             """<b>Set Active Guards</b>"""
             """<p>This opens a dialog to set the active guards.</p>"""
         ))
-        self.hgQueueActivateGuardsAct.triggered[()].connect(self.__hgQueueGuardsSetActive)
+        self.hgQueueActivateGuardsAct.triggered[()].connect(
+            self.__hgQueueGuardsSetActive)
         self.actions.append(self.hgQueueActivateGuardsAct)
         
-        self.hgQueueDeactivateGuardsAct = E5Action(self.trUtf8('Deactivate Guards'),
-                self.trUtf8('Deactivate Guards...'),
-                0, 0, self, 'mercurial_queues_guards_deactivate')
+        self.hgQueueDeactivateGuardsAct = E5Action(
+            self.trUtf8('Deactivate Guards'),
+            self.trUtf8('Deactivate Guards...'),
+            0, 0, self, 'mercurial_queues_guards_deactivate')
         self.hgQueueDeactivateGuardsAct.setStatusTip(self.trUtf8(
             'Deactivate all active guards'
         ))
@@ -568,7 +592,8 @@
                 self.trUtf8('Purge Queue'),
                 0, 0, self, 'mercurial_queues_purge_queue')
         self.hgQueuePurgeQueueAct.setStatusTip(self.trUtf8(
-            'Delete the reference to a patch queue and remove the patch directory'
+            'Delete the reference to a patch queue and remove the patch'
+            ' directory'
         ))
         self.hgQueuePurgeQueueAct.setWhatsThis(self.trUtf8(
             """<b>Purge Queue</b>"""
@@ -721,7 +746,8 @@
         Private slot used to refresh the current patch and its commit message.
         """
         self.vcs.getExtensionObject("mq")\
-            .hgQueueRefreshPatch(self.project.getProjectPath(), editMessage=True)
+            .hgQueueRefreshPatch(self.project.getProjectPath(),
+                                 editMessage=True)
     
     def __hgQueueShowPatch(self):
         """
@@ -740,7 +766,8 @@
     def __hgQueuePushPopPatches(self, name, operation, all=False, named=False,
                                 force=False):
         """
-        Private method to push patches onto the stack or pop patches off the stack.
+        Private method to push patches onto the stack or pop patches off the
+        stack.
         
         @param name file/directory name (string)
         @param operation operation type to be performed (Queues.POP,
@@ -749,11 +776,10 @@
         @keyparam named flag indicating to push/pop until a named patch
             is at the top of the stack (boolean)
         @keyparam force flag indicating a forceful pop (boolean)
-        @return flag indicating that the project should be reread (boolean)
         """
         shouldReopen = self.vcs.getExtensionObject("mq")\
-            .hgQueuePushPopPatches(name, operation=operation, all=all, named=named,
-                force=force)
+            .hgQueuePushPopPatches(name, operation=operation, all=all,
+                                   named=named, force=force)
         if shouldReopen:
             res = E5MessageBox.yesNo(None,
                 self.trUtf8("Changing Applied Patches"),

eric ide

mercurial