Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py

changeset 2845
7e55c6268c35
parent 2302
f29e9405c851
child 2847
1843ef6e2656
child 3009
bf5ae5d7477d
--- a/Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py	Mon Aug 05 13:17:51 2013 +0200
+++ b/Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py	Mon Aug 05 15:58:30 2013 +0200
@@ -252,10 +252,17 @@
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
             self.trUtf8('Show difference'), self._VCSDiff)
         self.vcsMenuActions.append(act)
+        act = menu.addAction(UI.PixmapCache.getIcon("vcsSbsDiff.png"),
+            self.trUtf8('Show difference side-by-side'), self.__SVNSbsDiff)
+        self.vcsMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
             self.trUtf8('Show difference (extended)'),
             self.__SVNExtendedDiff)
         self.vcsMenuActions.append(act)
+        act = menu.addAction(UI.PixmapCache.getIcon("vcsSbsDiff.png"),
+            self.trUtf8('Show difference side-by-side (extended)'),
+            self.__SVNSbsExtendedDiff)
+        self.vcsMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
             self.trUtf8('Show difference (URLs)'),
             self.__SVNUrlDiff)
@@ -761,6 +768,24 @@
                 names.append(itm.dirName())
         self.vcs.svnUrlDiff(names)
         
+    def __SVNSbsDiff(self):
+        """
+        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()
+        self.vcs.svnSbsDiff(fn)
+    
+    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.
+        """
+        itm = self.browser.currentItem()
+        fn = itm.fileName()
+        self.vcs.svnSbsDiff(fn, extended=True)
+    
     def __SVNLogBrowser(self):
         """
         Private slot called by the context menu to show the log browser for a file.
@@ -768,9 +793,11 @@
         itm = self.browser.currentItem()
         try:
             fn = itm.fileName()
+            isFile = True
         except AttributeError:
             fn = itm.dirName()
-        self.vcs.svnLogBrowser(fn)
+            isFile = False
+        self.vcs.svnLogBrowser(fn, isFile=isFile)
         
     def __SVNBlame(self):
         """

eric ide

mercurial