[PATCH 29 of 35] extdiff: define inferrepo in command decorator
Gregory Szorc
gregory.szorc at gmail.com
Mon May 5 00:51:34 CDT 2014
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1399267767 25200
# Sun May 04 22:29:27 2014 -0700
# Branch stable
# Node ID 75277696df23760fdcc7fd94c0d192e920a2c73f
# Parent 24499eebef38fd7fc3a67467bbdab9a17b0169f0
extdiff: define inferrepo in command decorator
diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -243,17 +243,18 @@ def dodiff(ui, repo, diffcmd, diffopts,
@command('extdiff',
[('p', 'program', '',
_('comparison program to run'), _('CMD')),
('o', 'option', [],
_('pass option to comparison program'), _('OPT')),
('r', 'rev', [], _('revision'), _('REV')),
('c', 'change', '', _('change made by revision'), _('REV')),
] + commands.walkopts,
- _('hg extdiff [OPT]... [FILE]...'))
+ _('hg extdiff [OPT]... [FILE]...'),
+ inferrepo=True)
def extdiff(ui, repo, *pats, **opts):
'''use external program to diff repository (or selected files)
Show differences between revisions for the specified files, using
an external program. The default program used is diff, with
default options "-Npru".
To select a different program, use the -p/--program option. The
@@ -320,10 +321,8 @@ use %(path)s to diff repository (or sele
# fail when the docstring contains non-ASCII characters.
# Decoding the string to a Unicode string here (using the
# right encoding) prevents that.
mydiff.__doc__ = doc.decode(encoding.encoding)
return mydiff
cmdtable[cmd] = (save(cmd, path, diffopts),
cmdtable['extdiff'][1][1:],
_('hg %s [OPTION]... [FILE]...') % cmd)
-
-commands.inferrepo += " extdiff"
More information about the Mercurial-devel
mailing list