Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1112
8a7d1b9d18db
--- a/Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py	Fri Mar 11 08:55:14 2011 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py	Fri Mar 11 16:51:57 2011 +0100
@@ -22,12 +22,13 @@
 
 import UI.PixmapCache
 
+
 class SvnProjectBrowserHelper(VcsProjectBrowserHelper):
     """
     Class implementing the VCS project browser helper for subversion.
     """
     def __init__(self, vcsObject, browserObject, projectObject, isTranslationsBrowser,
-        parent = None, name = None):
+        parent=None, name=None):
         """
         Constructor
         
@@ -44,9 +45,9 @@
     
     def showContextMenu(self, menu, standardItems):
         """
-        Slot called before the context menu is shown. 
+        Slot called before the context menu is shown.
         
-        It enables/disables the VCS menu entries depending on the overall 
+        It enables/disables the VCS menu entries depending on the overall
         VCS status and the file status.
         
         @param menu reference to the menu to be shown
@@ -79,9 +80,9 @@
     
     def showContextMenuMulti(self, menu, standardItems):
         """
-        Slot called before the context menu (multiple selections) is shown. 
+        Slot called before the context menu (multiple selections) is shown.
         
-        It enables/disables the VCS menu entries depending on the overall 
+        It enables/disables the VCS menu entries depending on the overall
         VCS status and the files status.
         
         @param menu reference to the menu to be shown
@@ -120,9 +121,9 @@
     
     def showContextMenuDir(self, menu, standardItems):
         """
-        Slot called before the context menu is shown. 
+        Slot called before the context menu is shown.
         
-        It enables/disables the VCS menu entries depending on the overall 
+        It enables/disables the VCS menu entries depending on the overall
         VCS status and the directory status.
         
         @param menu reference to the menu to be shown
@@ -146,9 +147,9 @@
     
     def showContextMenuDirMulti(self, menu, standardItems):
         """
-        Slot called before the context menu is shown. 
+        Slot called before the context menu is shown.
         
-        It enables/disables the VCS menu entries depending on the overall 
+        It enables/disables the VCS menu entries depending on the overall
         VCS status and the directory status.
         
         @param menu reference to the menu to be shown
@@ -199,7 +200,7 @@
         
         act = menu.addAction(
             UI.PixmapCache.getIcon(
-                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")), 
+                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")),
             self.vcs.vcsName(), self._VCSInfoDisplay)
         font = act.font()
         font.setBold(True)
@@ -210,21 +211,21 @@
             self.trUtf8('Update from repository'), self._VCSUpdate)
         self.vcsMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsCommit.png"),
-            self.trUtf8('Commit changes to repository...'), 
+            self.trUtf8('Commit changes to repository...'),
             self._VCSCommit)
         self.vcsMenuActions.append(act)
         menu.addSeparator()
         act = menu.addAction(UI.PixmapCache.getIcon("vcsAdd.png"),
-            self.trUtf8('Add to repository'), 
+            self.trUtf8('Add to repository'),
             self._VCSAdd)
         self.vcsAddMenuActions.append(act)
         if 1 in self.browser.specialMenuEntries:
             self.vcsMenuAddTree = menu.addAction(UI.PixmapCache.getIcon("vcsAdd.png"),
-                self.trUtf8('Add tree to repository'), 
+                self.trUtf8('Add tree to repository'),
                 self._VCSAddTree)
             self.vcsAddMenuActions.append(self.vcsMenuAddTree)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsRemove.png"),
-            self.trUtf8('Remove from repository (and disk)'), 
+            self.trUtf8('Remove from repository (and disk)'),
             self._VCSRemove)
         self.vcsMenuActions.append(act)
         menu.addSeparator()
@@ -234,10 +235,10 @@
         self.vcsMenuActions.append(act)
         if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0):
             menu.addSeparator()
-            act = menu.addAction(self.trUtf8("Add to Changelist"), 
+            act = menu.addAction(self.trUtf8("Add to Changelist"),
                 self.__SVNAddToChangelist)
             self.vcsMenuActions.append(act)
-            act = menu.addAction(self.trUtf8("Remove from Changelist"), 
+            act = menu.addAction(self.trUtf8("Remove from Changelist"),
                 self.__SVNRemoveFromChangelist)
             self.vcsMenuActions.append(act)
         menu.addSeparator()
@@ -262,14 +263,14 @@
             self.trUtf8('Show difference'), self._VCSDiff)
         self.vcsMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
-            self.trUtf8('Show difference (extended)'), 
+            self.trUtf8('Show difference (extended)'),
             self.__SVNExtendedDiff)
         self.vcsMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
-            self.trUtf8('Show difference (URLs)'), 
+            self.trUtf8('Show difference (URLs)'),
             self.__SVNUrlDiff)
         self.vcsMenuActions.append(act)
-        self.blameAct = menu.addAction(self.trUtf8('Show annotated file'), 
+        self.blameAct = menu.addAction(self.trUtf8('Show annotated file'),
             self.__SVNBlame)
         self.vcsMenuActions.append(self.blameAct)
         menu.addSeparator()
@@ -319,7 +320,7 @@
         
     def _addVCSMenuMulti(self, mainMenu):
         """
-        Protected method used to add the VCS menu for multi selection to all 
+        Protected method used to add the VCS menu for multi selection to all
         project browsers.
         
         @param mainMenu reference to the menu to be amended
@@ -331,7 +332,7 @@
         
         act = menu.addAction(
             UI.PixmapCache.getIcon(
-                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")), 
+                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")),
             self.vcs.vcsName(), self._VCSInfoDisplay)
         font = act.font()
         font.setBold(True)
@@ -342,7 +343,7 @@
             self.trUtf8('Update from repository'), self._VCSUpdate)
         self.vcsMultiMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsCommit.png"),
-            self.trUtf8('Commit changes to repository...'), 
+            self.trUtf8('Commit changes to repository...'),
             self._VCSCommit)
         self.vcsMultiMenuActions.append(act)
         menu.addSeparator()
@@ -355,15 +356,15 @@
                 self.trUtf8('Add tree to repository'), self._VCSAddTree)
             self.vcsAddMultiMenuActions.append(self.vcsMultiMenuAddTree)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsRemove.png"),
-            self.trUtf8('Remove from repository (and disk)'), 
+            self.trUtf8('Remove from repository (and disk)'),
             self._VCSRemove)
         self.vcsMultiMenuActions.append(act)
         if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0):
             menu.addSeparator()
-            act = menu.addAction(self.trUtf8("Add to Changelist"), 
+            act = menu.addAction(self.trUtf8("Add to Changelist"),
                 self.__SVNAddToChangelist)
             self.vcsMenuActions.append(act)
-            act = menu.addAction(self.trUtf8("Remove from Changelist"), 
+            act = menu.addAction(self.trUtf8("Remove from Changelist"),
                 self.__SVNRemoveFromChangelist)
             self.vcsMenuActions.append(act)
         menu.addSeparator()
@@ -375,11 +376,11 @@
             self.trUtf8('Show difference'), self._VCSDiff)
         self.vcsMultiMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
-            self.trUtf8('Show difference (extended)'), 
+            self.trUtf8('Show difference (extended)'),
             self.__SVNExtendedDiff)
         self.vcsMultiMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
-            self.trUtf8('Show difference (URLs)'), 
+            self.trUtf8('Show difference (URLs)'),
             self.__SVNUrlDiff)
         self.vcsMultiMenuActions.append(act)
         menu.addSeparator()
@@ -434,7 +435,7 @@
         
         act = menu.addAction(
             UI.PixmapCache.getIcon(
-                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")), 
+                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")),
             self.vcs.vcsName(), self._VCSInfoDisplay)
         font = act.font()
         font.setBold(True)
@@ -472,7 +473,7 @@
         
         act = menu.addAction(
             UI.PixmapCache.getIcon(
-                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")), 
+                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")),
             self.vcs.vcsName(), self._VCSInfoDisplay)
         font = act.font()
         font.setBold(True)
@@ -483,7 +484,7 @@
             self.trUtf8('Update from repository'), self._VCSUpdate)
         self.vcsDirMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsCommit.png"),
-            self.trUtf8('Commit changes to repository...'), 
+            self.trUtf8('Commit changes to repository...'),
             self._VCSCommit)
         self.vcsDirMenuActions.append(act)
         menu.addSeparator()
@@ -491,7 +492,7 @@
             self.trUtf8('Add to repository'), self._VCSAdd)
         self.vcsAddDirMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsRemove.png"),
-            self.trUtf8('Remove from repository (and disk)'), 
+            self.trUtf8('Remove from repository (and disk)'),
             self._VCSRemove)
         self.vcsDirMenuActions.append(act)
         menu.addSeparator()
@@ -501,10 +502,10 @@
         self.vcsDirMenuActions.append(act)
         if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0):
             menu.addSeparator()
-            act = menu.addAction(self.trUtf8("Add to Changelist"), 
+            act = menu.addAction(self.trUtf8("Add to Changelist"),
                 self.__SVNAddToChangelist)
             self.vcsMenuActions.append(act)
-            act = menu.addAction(self.trUtf8("Remove from Changelist"), 
+            act = menu.addAction(self.trUtf8("Remove from Changelist"),
                 self.__SVNRemoveFromChangelist)
             self.vcsMenuActions.append(act)
         menu.addSeparator()
@@ -529,11 +530,11 @@
             self.trUtf8('Show difference'), self._VCSDiff)
         self.vcsDirMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
-            self.trUtf8('Show difference (extended)'), 
+            self.trUtf8('Show difference (extended)'),
             self.__SVNExtendedDiff)
         self.vcsDirMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
-            self.trUtf8('Show difference (URLs)'), 
+            self.trUtf8('Show difference (URLs)'),
             self.__SVNUrlDiff)
         self.vcsDirMenuActions.append(act)
         menu.addSeparator()
@@ -584,7 +585,7 @@
         
         act = menu.addAction(
             UI.PixmapCache.getIcon(
-                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")), 
+                os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")),
             self.vcs.vcsName(), self._VCSInfoDisplay)
         font = act.font()
         font.setBold(True)
@@ -595,7 +596,7 @@
             self.trUtf8('Update from repository'), self._VCSUpdate)
         self.vcsDirMultiMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsCommit.png"),
-            self.trUtf8('Commit changes to repository...'),    
+            self.trUtf8('Commit changes to repository...'),
             self._VCSCommit)
         self.vcsDirMultiMenuActions.append(act)
         menu.addSeparator()
@@ -603,15 +604,15 @@
             self.trUtf8('Add to repository'), self._VCSAdd)
         self.vcsAddDirMultiMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsRemove.png"),
-            self.trUtf8('Remove from repository (and disk)'), 
+            self.trUtf8('Remove from repository (and disk)'),
             self._VCSRemove)
         self.vcsDirMultiMenuActions.append(act)
         if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0):
             menu.addSeparator()
-            act = menu.addAction(self.trUtf8("Add to Changelist"), 
+            act = menu.addAction(self.trUtf8("Add to Changelist"),
                 self.__SVNAddToChangelist)
             self.vcsMenuActions.append(act)
-            act = menu.addAction(self.trUtf8("Remove from Changelist"), 
+            act = menu.addAction(self.trUtf8("Remove from Changelist"),
                 self.__SVNRemoveFromChangelist)
             self.vcsMenuActions.append(act)
         menu.addSeparator()
@@ -623,11 +624,11 @@
             self.trUtf8('Show difference'), self._VCSDiff)
         self.vcsDirMultiMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
-            self.trUtf8('Show difference (extended)'), 
+            self.trUtf8('Show difference (extended)'),
             self.__SVNExtendedDiff)
         self.vcsDirMultiMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
-            self.trUtf8('Show difference (URLs)'), 
+            self.trUtf8('Show difference (URLs)'),
             self.__SVNUrlDiff)
         self.vcsDirMultiMenuActions.append(act)
         menu.addSeparator()
@@ -838,7 +839,7 @@
                 names.append(itm.fileName())
             except AttributeError:
                 names.append(itm.dirName())
-        self.vcs.svnUnlock(names, breakIt = True)
+        self.vcs.svnUnlock(names, breakIt=True)
         
     def __SVNStealLock(self):
         """
@@ -850,11 +851,11 @@
                 names.append(itm.fileName())
             except AttributeError:
                 names.append(itm.dirName())
-        self.vcs.svnLock(names, stealIt = True)
+        self.vcs.svnLock(names, stealIt=True)
         
     def __SVNInfo(self):
         """
-        Private slot called by the context menu to show repository information of 
+        Private slot called by the context menu to show repository information of
         a file or directory.
         """
         try:

eric ide

mercurial