Steve Borho committed 740ec4c

cmenu: vdiff default removed from site-wide Mercurial.ini

The entire [tortoisehg] section has been removed from the site-wide
Mercurial.ini keep users from using that file to configure thg.
User can still disable visual diff by using [tortoisehg] vdiff=

  • Participants
  • Parent commits 8800caf

Comments (0)

Files changed (3)


         repo = self.get_repo_for_path(path)
         if repo is None:
-        diffcmd = repo.ui.config('tortoisehg', 'vdiff', None)
-        if diffcmd is None:
+        diffcmd = repo.ui.config('tortoisehg', 'vdiff', 'vdiff')
+        if not diffcmd:
             self._run_dialog('diff', vfs_files)
             cmdline = ['hg', diffcmd]
         if not self.diffcmd :
             # default to tortoisehg's configuration
-            vdiff = self.ui.config('tortoisehg', 'vdiff')
+            vdiff = self.ui.config('tortoisehg', 'vdiff', 'vdiff')
             if vdiff:
                 self.diffcmd = self.ui.config('extdiff', 'cmd.'+vdiff) or vdiff


                            self._shelve, icon="shelve.ico"))
             # Visual Diff (any extdiff command)
-            has_vdiff = repo.ui.config('tortoisehg', 'vdiff', '') != ''
+            has_vdiff = repo.ui.config('tortoisehg', 'vdiff', 'vdiff') != ''
             result.append(TortoiseMenu(_("Visual Diff"),
                            _("View changes using GUI diff tool"),
                            self._vdiff, icon="TortoiseMerge.ico",
     def _vdiff(self, parent_window):
         '''[tortoisehg] vdiff = <any extdiff command>'''
-        diff = ui.ui().config('tortoisehg', 'vdiff', None)
+        diff = ui.ui().config('tortoisehg', 'vdiff', 'vdiff')
         if not diff:
             msg = "You must configure tortoisehg.vdiff in your Mercurial.ini"
             title = "Visual Diff Not Configured"