--- a/Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py Fri Mar 11 08:55:14 2011 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py Fri Mar 11 16:51:57 2011 +0100 @@ -20,12 +20,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 @@ -42,9 +43,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 @@ -77,9 +78,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 @@ -118,9 +119,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 @@ -144,9 +145,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 @@ -197,7 +198,7 @@ act = menu.addAction( UI.PixmapCache.getIcon( - os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), + os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), self.vcs.vcsName(), self._VCSInfoDisplay) font = act.font() font.setBold(True) @@ -208,21 +209,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() @@ -232,10 +233,10 @@ self.vcsMenuActions.append(act) if self.vcs.versionStr >= '1.5.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() @@ -258,14 +259,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() @@ -316,7 +317,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 @@ -328,7 +329,7 @@ act = menu.addAction( UI.PixmapCache.getIcon( - os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), + os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), self.vcs.vcsName(), self._VCSInfoDisplay) font = act.font() font.setBold(True) @@ -339,7 +340,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() @@ -352,15 +353,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 self.vcs.versionStr >= '1.5.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() @@ -372,11 +373,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() @@ -432,7 +433,7 @@ act = menu.addAction( UI.PixmapCache.getIcon( - os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), + os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), self.vcs.vcsName(), self._VCSInfoDisplay) font = act.font() font.setBold(True) @@ -470,7 +471,7 @@ act = menu.addAction( UI.PixmapCache.getIcon( - os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), + os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), self.vcs.vcsName(), self._VCSInfoDisplay) font = act.font() font.setBold(True) @@ -481,7 +482,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() @@ -489,7 +490,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() @@ -499,10 +500,10 @@ self.vcsDirMenuActions.append(act) if self.vcs.versionStr >= '1.5.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() @@ -525,11 +526,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() @@ -580,7 +581,7 @@ act = menu.addAction( UI.PixmapCache.getIcon( - os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), + os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), self.vcs.vcsName(), self._VCSInfoDisplay) font = act.font() font.setBold(True) @@ -591,7 +592,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() @@ -599,15 +600,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 self.vcs.versionStr >= '1.5.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() @@ -619,11 +620,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() @@ -834,7 +835,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): """ @@ -846,7 +847,7 @@ names.append(itm.fileName()) except AttributeError: names.append(itm.dirName()) - self.vcs.svnLock(names, stealIt = True) + self.vcs.svnLock(names, stealIt=True) def __SVNConfigure(self): """