Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2847
1843ef6e2656
parent 3009
bf5ae5d7477d
child 3058
0a02c433f52d
--- a/Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py	Fri Oct 18 23:00:41 2013 +0200
@@ -27,21 +27,22 @@
     """
     Class implementing the VCS project browser helper for subversion.
     """
-    def __init__(self, vcsObject, browserObject, projectObject, isTranslationsBrowser,
-        parent=None, name=None):
+    def __init__(self, vcsObject, browserObject, projectObject,
+                 isTranslationsBrowser, parent=None, name=None):
         """
         Constructor
         
         @param vcsObject reference to the vcs object
         @param browserObject reference to the project browser object
         @param projectObject reference to the project object
-        @param isTranslationsBrowser flag indicating, the helper is requested for the
-            translations browser (this needs some special treatment)
+        @param isTranslationsBrowser flag indicating, the helper is requested
+            for the translations browser (this needs some special treatment)
         @param parent parent widget (QWidget)
         @param name name of this object (string)
         """
-        VcsProjectBrowserHelper.__init__(self, vcsObject, browserObject, projectObject,
-            isTranslationsBrowser, parent, name)
+        VcsProjectBrowserHelper.__init__(self, vcsObject, browserObject,
+                                         projectObject, isTranslationsBrowser,
+                                         parent, name)
     
     def showContextMenu(self, menu, standardItems):
         """
@@ -51,8 +52,8 @@
         VCS status and the file status.
         
         @param menu reference to the menu to be shown
-        @param standardItems array of standard items that need activation/deactivation
-            depending on the overall VCS status
+        @param standardItems array of standard items that need
+            activation/deactivation depending on the overall VCS status
         """
         if self.browser.currentItem().data(1) == self.vcs.vcsName():
             for act in self.vcsMenuActions:
@@ -86,8 +87,8 @@
         VCS status and the files status.
         
         @param menu reference to the menu to be shown
-        @param standardItems array of standard items that need activation/deactivation
-            depending on the overall VCS status
+        @param standardItems array of standard items that need
+            activation/deactivation depending on the overall VCS status
         """
         vcsName = self.vcs.vcsName()
         items = self.browser.getSelectedItems()
@@ -127,8 +128,8 @@
         VCS status and the directory status.
         
         @param menu reference to the menu to be shown
-        @param standardItems array of standard items that need activation/deactivation
-            depending on the overall VCS status
+        @param standardItems array of standard items that need
+            activation/deactivation depending on the overall VCS status
         """
         if self.browser.currentItem().data(1) == self.vcs.vcsName():
             for act in self.vcsDirMenuActions:
@@ -153,8 +154,8 @@
         VCS status and the directory status.
         
         @param menu reference to the menu to be shown
-        @param standardItems array of standard items that need activation/deactivation
-            depending on the overall VCS status
+        @param standardItems array of standard items that need
+            activation/deactivation depending on the overall VCS status
         """
         vcsName = self.vcs.vcsName()
         items = self.browser.getSelectedItems()
@@ -183,9 +184,9 @@
             for act in standardItems:
                 act.setEnabled(True)
 
-    ############################################################################
+    ###########################################################################
     # Protected menu generation methods below
-    ############################################################################
+    ###########################################################################
 
     def _addVCSMenu(self, mainMenu):
         """
@@ -220,7 +221,8 @@
             self._VCSAdd)
         self.vcsAddMenuActions.append(act)
         if 1 in self.browser.specialMenuEntries:
-            self.vcsMenuAddTree = menu.addAction(UI.PixmapCache.getIcon("vcsAdd.png"),
+            self.vcsMenuAddTree = menu.addAction(
+                UI.PixmapCache.getIcon("vcsAdd.png"),
                 self.trUtf8('Add tree to repository'),
                 self._VCSAddTree)
             self.vcsAddMenuActions.append(self.vcsMenuAddTree)
@@ -284,7 +286,8 @@
         act = menu.addAction(UI.PixmapCache.getIcon("vcsMerge.png"),
             self.trUtf8('Merge changes'), self._VCSMerge)
         self.vcsMenuActions.append(act)
-        act = menu.addAction(self.trUtf8('Conflict resolved'), self.__SVNResolve)
+        act = menu.addAction(
+            self.trUtf8('Conflict resolved'), self.__SVNResolve)
         self.vcsMenuActions.append(act)
         menu.addSeparator()
         act = menu.addAction(UI.PixmapCache.getIcon("vcsLock.png"),
@@ -302,7 +305,8 @@
         menu.addSeparator()
         act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp)
         self.vcsMenuActions.append(act)
-        act = menu.addAction(self.trUtf8('List Properties'), self.__SVNListProps)
+        act = menu.addAction(
+            self.trUtf8('List Properties'), self.__SVNListProps)
         self.vcsMenuActions.append(act)
         act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp)
         self.vcsMenuActions.append(act)
@@ -391,7 +395,8 @@
         act = menu.addAction(UI.PixmapCache.getIcon("vcsRevert.png"),
             self.trUtf8('Revert changes'), self._VCSRevert)
         self.vcsMultiMenuActions.append(act)
-        act = menu.addAction(self.trUtf8('Conflict resolved'), self.__SVNResolve)
+        act = menu.addAction(
+            self.trUtf8('Conflict resolved'), self.__SVNResolve)
         self.vcsMultiMenuActions.append(act)
         menu.addSeparator()
         act = menu.addAction(UI.PixmapCache.getIcon("vcsLock.png"),
@@ -409,7 +414,8 @@
         menu.addSeparator()
         act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp)
         self.vcsMultiMenuActions.append(act)
-        act = menu.addAction(self.trUtf8('List Properties'), self.__SVNListProps)
+        act = menu.addAction(
+            self.trUtf8('List Properties'), self.__SVNListProps)
         self.vcsMultiMenuActions.append(act)
         act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp)
         self.vcsMultiMenuActions.append(act)
@@ -545,12 +551,14 @@
         act = menu.addAction(UI.PixmapCache.getIcon("vcsMerge.png"),
             self.trUtf8('Merge changes'), self._VCSMerge)
         self.vcsDirMenuActions.append(act)
-        act = menu.addAction(self.trUtf8('Conflict resolved'), self.__SVNResolve)
+        act = menu.addAction(
+            self.trUtf8('Conflict resolved'), self.__SVNResolve)
         self.vcsDirMenuActions.append(act)
         menu.addSeparator()
         act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp)
         self.vcsDirMenuActions.append(act)
-        act = menu.addAction(self.trUtf8('List Properties'), self.__SVNListProps)
+        act = menu.addAction(
+            self.trUtf8('List Properties'), self.__SVNListProps)
         self.vcsDirMenuActions.append(act)
         act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp)
         self.vcsDirMenuActions.append(act)
@@ -639,12 +647,14 @@
         act = menu.addAction(UI.PixmapCache.getIcon("vcsMerge.png"),
             self.trUtf8('Merge changes'), self._VCSMerge)
         self.vcsDirMultiMenuActions.append(act)
-        act = menu.addAction(self.trUtf8('Conflict resolved'), self.__SVNResolve)
+        act = menu.addAction(
+            self.trUtf8('Conflict resolved'), self.__SVNResolve)
         self.vcsDirMultiMenuActions.append(act)
         menu.addSeparator()
         act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp)
         self.vcsDirMultiMenuActions.append(act)
-        act = menu.addAction(self.trUtf8('List Properties'), self.__SVNListProps)
+        act = menu.addAction(
+            self.trUtf8('List Properties'), self.__SVNListProps)
         self.vcsDirMultiMenuActions.append(act)
         act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp)
         self.vcsDirMultiMenuActions.append(act)
@@ -664,9 +674,9 @@
         mainMenu.addMenu(menu)
         self.menuDirMulti = menu
     
-    ############################################################################
+    ###########################################################################
     # Menu handling methods below
-    ############################################################################
+    ###########################################################################
     
     def __SVNCopy(self):
         """
@@ -711,8 +721,8 @@
         
     def __SVNListProps(self):
         """
-        Private slot called by the context menu to list the subversion properties of
-        a file.
+        Private slot called by the context menu to list the subversion
+        properties of a file.
         """
         names = []
         for itm in self.browser.getSelectedItems():
@@ -724,7 +734,8 @@
         
     def __SVNSetProp(self):
         """
-        Private slot called by the context menu to set a subversion property of a file.
+        Private slot called by the context menu to set a subversion
+        property of a file.
         """
         names = []
         for itm in self.browser.getSelectedItems():
@@ -736,7 +747,8 @@
         
     def __SVNDelProp(self):
         """
-        Private slot called by the context menu to delete a subversion property of a file.
+        Private slot called by the context menu to delete a subversion
+        property of a file.
         """
         names = []
         for itm in self.browser.getSelectedItems():
@@ -748,8 +760,8 @@
         
     def __SVNExtendedDiff(self):
         """
-        Private slot called by the context menu to show the difference of a file to
-        the repository.
+        Private slot called by the context menu to show the difference of a
+        file to the repository.
         
         This gives the chance to enter the revisions to compare.
         """
@@ -763,8 +775,8 @@
         
     def __SVNUrlDiff(self):
         """
-        Private slot called by the context menu to show the difference of a file of
-        two repository URLs.
+        Private slot called by the context menu to show the difference of a
+        file of two repository URLs.
         
         This gives the chance to enter the repository URLs to compare.
         """
@@ -778,8 +790,8 @@
         
     def __SVNSbsDiff(self):
         """
-        Private slot called by the context menu to show the difference of a file to
-        the repository side-by-side.
+        Private slot called by the context menu to show the difference of a
+        file to the repository side-by-side.
         """
         itm = self.browser.currentItem()
         fn = itm.fileName()
@@ -787,8 +799,9 @@
     
     def __SVNSbsExtendedDiff(self):
         """
-        Private slot called by the context menu to show the difference of a file to
-        the repository side-by-side allowing the selection of revisions to compare.
+        Private slot called by the context menu to show the difference of a
+        file to the repository side-by-side allowing the selection of
+        revisions to compare.
         """
         itm = self.browser.currentItem()
         fn = itm.fileName()
@@ -796,7 +809,8 @@
     
     def __SVNLogBrowser(self):
         """
-        Private slot called by the context menu to show the log browser for a file.
+        Private slot called by the context menu to show the log browser for a
+        file.
         """
         itm = self.browser.currentItem()
         try:
@@ -817,7 +831,8 @@
         
     def __SVNLock(self):
         """
-        Private slot called by the context menu to lock files in the repository.
+        Private slot called by the context menu to lock files in the
+        repository.
         """
         names = []
         for itm in self.browser.getSelectedItems():
@@ -829,7 +844,8 @@
         
     def __SVNUnlock(self):
         """
-        Private slot called by the context menu to unlock files in the repository.
+        Private slot called by the context menu to unlock files in the
+        repository.
         """
         names = []
         for itm in self.browser.getSelectedItems():
@@ -841,7 +857,8 @@
         
     def __SVNBreakLock(self):
         """
-        Private slot called by the context menu to break lock files in the repository.
+        Private slot called by the context menu to break lock files in the
+        repository.
         """
         names = []
         for itm in self.browser.getSelectedItems():
@@ -853,7 +870,8 @@
         
     def __SVNStealLock(self):
         """
-        Private slot called by the context menu to steal lock files in the repository.
+        Private slot called by the context menu to steal lock files in the
+        repository.
         """
         names = []
         for itm in self.browser.getSelectedItems():
@@ -865,8 +883,8 @@
         
     def __SVNInfo(self):
         """
-        Private slot called by the context menu to show repository information of
-        a file or directory.
+        Private slot called by the context menu to show repository information
+        of a file or directory.
         """
         try:
             name = self.browser.currentItem().fileName()
@@ -879,7 +897,8 @@
         """
         Private method to open the configuration dialog.
         """
-        e5App().getObject("UserInterface").showPreferences("zzz_subversionPage")
+        e5App().getObject("UserInterface")\
+            .showPreferences("zzz_subversionPage")
         
     def __SVNAddToChangelist(self):
         """
@@ -895,7 +914,8 @@
         
     def __SVNRemoveFromChangelist(self):
         """
-        Private slot called by the context menu to remove files from their changelist.
+        Private slot called by the context menu to remove files from their
+        changelist.
         """
         names = []
         for itm in self.browser.getSelectedItems():
@@ -905,9 +925,9 @@
                 names.append(itm.dirName())
         self.vcs.svnRemoveFromChangelist(names)
 
-    ############################################################################
+    ###########################################################################
     # Some private utility methods below
-    ############################################################################
+    ###########################################################################
     
     def __itemsHaveFiles(self, items):
         """

eric ide

mercurial