Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2911
ce77f0b1ee67
parent 3008
7848489bcb92
child 3058
0a02c433f52d
diff -r 9986ec0e559a -r 10516539f238 Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Fri Oct 18 23:00:41 2013 +0200
@@ -47,7 +47,8 @@
     MessageColumn = 6
     TagsColumn = 7
     
-    def __init__(self, vcs, mode="log", bundle=None, isFile=False, parent=None):
+    def __init__(self, vcs, mode="log", bundle=None, isFile=False,
+                 parent=None):
         """
         Constructor
         
@@ -73,8 +74,8 @@
         self.filesTree.headerItem().setText(self.filesTree.columnCount(), "")
         self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder)
         
-        self.refreshButton = \
-            self.buttonBox.addButton(self.trUtf8("&Refresh"), QDialogButtonBox.ActionRole)
+        self.refreshButton = self.buttonBox.addButton(
+            self.trUtf8("&Refresh"), QDialogButtonBox.ActionRole)
         self.refreshButton.setToolTip(
             self.trUtf8("Press to refresh the list of changesets"))
         self.refreshButton.setEnabled(False)
@@ -395,7 +396,8 @@
                 if self.bundle:
                     args.append("--repository")
                     args.append(self.bundle)
-                elif self.vcs.bundleFile and os.path.exists(self.vcs.bundleFile):
+                elif self.vcs.bundleFile and \
+                        os.path.exists(self.vcs.bundleFile):
                     args.append("--repository")
                     args.append(self.vcs.bundleFile)
             args.append("--template")
@@ -666,13 +668,16 @@
         args.append('--style')
         if self.vcs.version >= (2, 1):
             args.append(os.path.join(os.path.dirname(__file__),
-                                     "styles", "logBrowserBookmarkPhase.style"))
+                                     "styles",
+                                     "logBrowserBookmarkPhase.style"))
         elif self.vcs.version >= (1, 8):
             args.append(os.path.join(os.path.dirname(__file__),
-                                     "styles", "logBrowserBookmark.style"))
+                                     "styles",
+                                     "logBrowserBookmark.style"))
         else:
             args.append(os.path.join(os.path.dirname(__file__),
-                                     "styles", "logBrowser.style"))
+                                     "styles",
+                                     "logBrowser.style"))
         if self.commandMode == "incoming":
             if self.bundle:
                 args.append(self.bundle)
@@ -1051,7 +1056,8 @@
         """
         if self.graftButton.isVisible():
             if self.initialCommandMode == "log":
-                # step 1: count selected entries not belonging to the current branch
+                # step 1: count selected entries not belonging to the
+                #         current branch
                 otherBranches = 0
                 for itm in self.logTree.selectedItems():
                     branch = itm.text(self.BranchColumn)
@@ -1067,7 +1073,8 @@
         """
         Private slot to update GUI elements except the diff and phase buttons.
         
-        @param itm reference to the item the update should be based on (QTreeWidgetItem)
+        @param itm reference to the item the update should be based on
+            (QTreeWidgetItem)
         """
         self.messageEdit.clear()
         self.filesTree.clear()
@@ -1263,7 +1270,9 @@
     @pyqtSlot(bool)
     def on_stopCheckBox_clicked(self, checked):
         """
-        Private slot called, when the stop on copy/move checkbox is clicked
+        Private slot called, when the stop on copy/move checkbox is clicked.
+        
+        @param checked flag indicating the state of the check box (boolean)
         """
         self.vcs.getPlugin().setPreferences("StopLogOnCopy",
                                             self.stopCheckBox.isChecked())
@@ -1348,7 +1357,8 @@
         revs = []
         for itm in self.logTree.selectedItems():
             if itm.text(self.PhaseColumn) == currentPhase:
-                revs.append(itm.text(self.RevisionColumn).split(":")[0].strip())
+                revs.append(
+                    itm.text(self.RevisionColumn).split(":")[0].strip())
         
         if not revs:
             self.phaseButton.setEnabled(False)
@@ -1375,14 +1385,16 @@
         for itm in self.logTree.selectedItems():
             branch = itm.text(self.BranchColumn)
             if branch != self.__projectBranch:
-                revs.append(itm.text(self.RevisionColumn).strip().split(":", 1)[0])
+                revs.append(
+                    itm.text(self.RevisionColumn).strip().split(":", 1)[0])
         
         if revs:
             shouldReopen = self.vcs.hgGraft(self.repodir, revs)
             if shouldReopen:
                 res = E5MessageBox.yesNo(None,
                     self.trUtf8("Copy Changesets"),
-                    self.trUtf8("""The project should be reread. Do this now?"""),
+                    self.trUtf8(
+                        """The project should be reread. Do this now?"""),
                     yesDefault=True)
                 if res:
                     e5App().getObject("Project").reopenProject()

eric ide

mercurial