Plugins/PluginVcsMercurial.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1085
ef6102d5fefe
--- a/Plugins/PluginVcsMercurial.py	Fri Mar 11 08:55:14 2011 +0100
+++ b/Plugins/PluginVcsMercurial.py	Fri Mar 11 16:51:57 2011 +0100
@@ -38,6 +38,7 @@
 
 error = ""
 
+
 def exeDisplayData():
     """
     Public method to support the display of some executable info.
@@ -50,19 +51,20 @@
         exe += '.exe'
     
     data = {
-        "programEntry"      : True, 
-        "header"            : QApplication.translate("VcsMercurialPlugin",
-                                "Version Control - Mercurial"), 
-        "exe"               : exe, 
-        "versionCommand"    : 'version', 
-        "versionStartsWith" : 'Mercurial', 
-        "versionPosition"   : -1, 
-        "version"           : "", 
-        "versionCleanup"    : (0, -1), 
+        "programEntry": True,
+        "header": QApplication.translate("VcsMercurialPlugin",
+                                "Version Control - Mercurial"),
+        "exe": exe,
+        "versionCommand": 'version',
+        "versionStartsWith": 'Mercurial',
+        "versionPosition": -1,
+        "version": "",
+        "versionCleanup": (0, -1),
     }
     
     return data
 
+
 def getVcsSystemIndicator():
     """
     Public function to get the indicators for this version control system.
@@ -80,6 +82,7 @@
         data["_hg"] = (pluginTypename, displayString())
     return data
 
+
 def displayString():
     """
     Public function to get the display string.
@@ -96,6 +99,7 @@
 
 mercurialCfgPluginObject = None
 
+
 def createConfigurationPage(configDlg):
     """
     Module function to create the configuration page.
@@ -109,6 +113,7 @@
     page = MercurialPage(mercurialCfgPluginObject)
     return page
     
+
 def getConfigData():
     """
     Module function returning data as required by the configuration dialog.
@@ -116,13 +121,14 @@
     @return dictionary with key "zzz_mercurialPage" containing the relevant data
     """
     return {
-        "zzz_mercurialPage" : \
-            [QApplication.translate("VcsMercurialPlugin", "Mercurial"), 
-             os.path.join("VcsPlugins", "vcsMercurial", "icons", 
+        "zzz_mercurialPage": \
+            [QApplication.translate("VcsMercurialPlugin", "Mercurial"),
+             os.path.join("VcsPlugins", "vcsMercurial", "icons",
                           "preferences-mercurial.png"),
              createConfigurationPage, "vcsPage", None],
     }
 
+
 def prepareUninstall():
     """
     Module function to prepare for an uninstallation.
@@ -130,6 +136,7 @@
     if not e5App().getObject("PluginManager").isPluginLoaded("PluginVcsMercurial"):
         Preferences.Prefs.settings.remove("Mercurial")
     
+
 class VcsMercurialPlugin(QObject):
     """
     Class implementing the Mercurial version control plugin.
@@ -144,23 +151,23 @@
         self.__ui = ui
         
         self.__mercurialDefaults = {
-            "StopLogOnCopy"  : True, # used in log browser
-            "UseLogBrowser"  : True, 
-            "LogLimit"       : 100, 
-            "CommitMessages" : 20, 
-            "PullUpdate"     : False,
-            "ServerPort"     : 8000, 
-            "ServerStyle"    : "", 
+            "StopLogOnCopy": True,  # used in log browser
+            "UseLogBrowser": True,
+            "LogLimit": 100,
+            "CommitMessages": 20,
+            "PullUpdate": False,
+            "ServerPort": 8000,
+            "ServerStyle": "",
         }
         
         from VcsPlugins.vcsMercurial.ProjectHelper import HgProjectHelper
         self.__projectHelperObject = HgProjectHelper(None, None)
         try:
-            e5App().registerPluginObject(pluginTypename, self.__projectHelperObject, 
+            e5App().registerPluginObject(pluginTypename, self.__projectHelperObject,
                                          pluginType)
         except KeyError:
             pass    # ignore duplicate registration
-        readShortcuts(pluginName = pluginTypename)
+        readShortcuts(pluginName=pluginTypename)
     
     def getProjectHelper(self):
         """
@@ -174,7 +181,7 @@
         """
         Public method to activate this plugin.
         
-        @return tuple of reference to instantiated viewmanager and 
+        @return tuple of reference to instantiated viewmanager and
             activation status (boolean)
         """
         from VcsPlugins.vcsMercurial.hg import Hg
@@ -203,7 +210,7 @@
         elif key in ["Commits"]:
             return Preferences.toList(Preferences.Prefs.settings.value(
                 "Mercurial/" + key))
-        else: 
+        else:
             return Preferences.Prefs.settings.value("Mercurial/" + key)
     
     def setPreferences(self, key, value):

eric ide

mercurial