# HG changeset patch
# User Mads Kiilerich <[email protected]>
# Date 1239748414 -7200
# Node ID ee7293383d6bec98567ac26c2dbf9b1956852a0c
# Parent e651a0fdbb5ee40d7a4d844d77136549739d2b32
Fix launch of vdiff from nautilus
hgtk has no "diff" subcommand but a fine "vdiff" subcommand.
The "not diffcmd" branch was never reached because of the default value.
diff --git a/contrib/nautilus-thg.py b/contrib/nautilus-thg.py
--- a/contrib/nautilus-thg.py
+++ b/contrib/nautilus-thg.py
@@ -124,9 +124,9 @@
print e
return None
- def run_dialog(self, menuitem, hgcmd, cwd = None):
+ def run_dialog(self, menuitem, hgtkcmd, cwd = None):
'''
- hgcmd - hgproc subcommand
+ hgtkcmd - hgtk subcommand
'''
if cwd: #bg
self.files = []
@@ -134,19 +134,17 @@
cwd = self.cwd
repo = self.get_repo_for_path(cwd)
- if hgcmd == 'vdiff':
- diffcmd = repo.ui.config('tortoisehg', 'vdiff', 'vdiff')
- if not diffcmd:
- hgcmd = 'diff'
- else:
+ if hgtkcmd == 'vdiff':
+ diffcmd = repo.ui.config('tortoisehg', 'vdiff')
+ if diffcmd:
cmdline = ['hg', diffcmd]
cmdline.extend(self.files)
subprocess.Popen(cmdline, shell=False, env=self.env, cwd=cwd)
return
- cmdopts = [sys.executable, self.hgproc, hgcmd]
+ cmdopts = [sys.executable, self.hgproc, hgtkcmd]
- if hgcmd not in nofilecmds and self.files:
+ if hgtkcmd not in nofilecmds and self.files:
# Use stdin to pass file list (avoid shell command
# line limitations)
pipe = subprocess.PIPE
@@ -160,7 +158,7 @@
stdin.write('\n'.join(self.files))
stdin.close()
- if hgcmd not in nocachecmds:
+ if hgtkcmd not in nocachecmds:
# Remove cached repo object, dirstate may change
self.cacherepo = None
self.cacheroot = None
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop