Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py

changeset 2837
a96cb48e86a5
parent 2405
d4b5f3bd4720
child 2838
0f1423054184
diff -r 289ad03f0e57 -r a96cb48e86a5 Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py
--- a/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py	Wed Jul 31 20:01:58 2013 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py	Wed Jul 31 20:07:41 2013 +0200
@@ -230,6 +230,9 @@
             self.trUtf8('Show difference'), self._VCSDiff)
         self.vcsMenuActions.append(act)
         act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
+            self.trUtf8('Show difference side-by-side'), self.__HgSbsDiff)
+        self.vcsMenuActions.append(act)
+        act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
             self.trUtf8('Show difference (extended)'),
             self.__HgExtendedDiff)
         self.vcsMenuActions.append(act)
@@ -567,6 +570,15 @@
                 names.append(itm.dirName())
         self.vcs.hgExtendedDiff(names)
     
+    def __HgSbsDiff(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.hgSbsDiff(fn)
+    
     def __HgAnnotate(self):
         """
         Private slot called by the context menu to show the annotations of a file.

eric ide

mercurial