Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py

branch
Py2 comp.
changeset 2847
1843ef6e2656
parent 2525
8b507a9a2d40
parent 2845
7e55c6268c35
child 3057
10516539f238
equal deleted inserted replaced
2846:b852fe4d153a 2847:1843ef6e2656
252 self.vcsMenuActions.append(act) 252 self.vcsMenuActions.append(act)
253 menu.addSeparator() 253 menu.addSeparator()
254 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"), 254 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
255 self.trUtf8('Show difference'), self._VCSDiff) 255 self.trUtf8('Show difference'), self._VCSDiff)
256 self.vcsMenuActions.append(act) 256 self.vcsMenuActions.append(act)
257 act = menu.addAction(UI.PixmapCache.getIcon("vcsSbsDiff.png"),
258 self.trUtf8('Show difference side-by-side'), self.__SVNSbsDiff)
259 self.vcsMenuActions.append(act)
257 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"), 260 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
258 self.trUtf8('Show difference (extended)'), 261 self.trUtf8('Show difference (extended)'),
259 self.__SVNExtendedDiff) 262 self.__SVNExtendedDiff)
263 self.vcsMenuActions.append(act)
264 act = menu.addAction(UI.PixmapCache.getIcon("vcsSbsDiff.png"),
265 self.trUtf8('Show difference side-by-side (extended)'),
266 self.__SVNSbsExtendedDiff)
260 self.vcsMenuActions.append(act) 267 self.vcsMenuActions.append(act)
261 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"), 268 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
262 self.trUtf8('Show difference (URLs)'), 269 self.trUtf8('Show difference (URLs)'),
263 self.__SVNUrlDiff) 270 self.__SVNUrlDiff)
264 self.vcsMenuActions.append(act) 271 self.vcsMenuActions.append(act)
761 names.append(itm.fileName()) 768 names.append(itm.fileName())
762 except AttributeError: 769 except AttributeError:
763 names.append(itm.dirName()) 770 names.append(itm.dirName())
764 self.vcs.svnUrlDiff(names) 771 self.vcs.svnUrlDiff(names)
765 772
773 def __SVNSbsDiff(self):
774 """
775 Private slot called by the context menu to show the difference of a file to
776 the repository side-by-side.
777 """
778 itm = self.browser.currentItem()
779 fn = itm.fileName()
780 self.vcs.svnSbsDiff(fn)
781
782 def __SVNSbsExtendedDiff(self):
783 """
784 Private slot called by the context menu to show the difference of a file to
785 the repository side-by-side allowing the selection of revisions to compare.
786 """
787 itm = self.browser.currentItem()
788 fn = itm.fileName()
789 self.vcs.svnSbsDiff(fn, extended=True)
790
766 def __SVNLogBrowser(self): 791 def __SVNLogBrowser(self):
767 """ 792 """
768 Private slot called by the context menu to show the log browser for a file. 793 Private slot called by the context menu to show the log browser for a file.
769 """ 794 """
770 itm = self.browser.currentItem() 795 itm = self.browser.currentItem()
771 try: 796 try:
772 fn = itm.fileName() 797 fn = itm.fileName()
798 isFile = True
773 except AttributeError: 799 except AttributeError:
774 fn = itm.dirName() 800 fn = itm.dirName()
775 self.vcs.svnLogBrowser(fn) 801 isFile = False
802 self.vcs.svnLogBrowser(fn, isFile=isFile)
776 803
777 def __SVNBlame(self): 804 def __SVNBlame(self):
778 """ 805 """
779 Private slot called by the context menu to show the blame of a file. 806 Private slot called by the context menu to show the blame of a file.
780 """ 807 """

eric ide

mercurial