Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py

changeset 2838
0f1423054184
parent 2837
a96cb48e86a5
child 2839
ae21f79512b7
--- a/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py	Wed Jul 31 20:07:41 2013 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py	Thu Aug 01 18:41:16 2013 +0200
@@ -229,6 +229,7 @@
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
             self.trUtf8('Show difference'), self._VCSDiff)
         self.vcsMenuActions.append(act)
+        # TODO: create an icon for SBS mode
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
             self.trUtf8('Show difference side-by-side'), self.__HgSbsDiff)
         self.vcsMenuActions.append(act)
@@ -236,6 +237,11 @@
             self.trUtf8('Show difference (extended)'),
             self.__HgExtendedDiff)
         self.vcsMenuActions.append(act)
+        # TODO: create an icon for SBS mode
+        act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
+            self.trUtf8('Show difference side-by-side (extended)'),
+            self.__HgSbsExtendedDiff)
+        self.vcsMenuActions.append(act)
         self.annotateAct = menu.addAction(self.trUtf8('Show annotated file'),
             self.__HgAnnotate)
         self.vcsMenuActions.append(self.annotateAct)
@@ -579,6 +585,15 @@
         fn = itm.fileName()
         self.vcs.hgSbsDiff(fn)
     
+    def __HgSbsExtendedDiff(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.hgSbsDiff(fn, extended=True)
+    
     def __HgAnnotate(self):
         """
         Private slot called by the context menu to show the annotations of a file.

eric ide

mercurial