Mercurial > hg
changeset 21783:82bf4d89e068
hgk: define inferrepo in command decorator
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 04 May 2014 22:33:22 -0700 |
parents | 404eca1ce4f9 |
children | 44efd5b9ce45 |
files | hgext/hgk.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/hgk.py Sun May 04 22:28:46 2014 -0700 +++ b/hgext/hgk.py Sun May 04 22:33:22 2014 -0700 @@ -50,7 +50,8 @@ ('s', 'stdin', None, _('stdin')), ('C', 'copy', None, _('detect copies')), ('S', 'search', "", _('search'))], - ('hg git-diff-tree [OPTION]... NODE1 NODE2 [FILE]...')) + ('hg git-diff-tree [OPTION]... NODE1 NODE2 [FILE]...'), + inferrepo=True) def difftree(ui, repo, node1=None, node2=None, *files, **opts): """diff trees from two commits""" def __difftree(repo, node1, node2, files=[]): @@ -145,7 +146,8 @@ @command('debug-cat-file', [('s', 'stdin', None, _('stdin'))], - _('hg debug-cat-file [OPTION]... TYPE FILE')) + _('hg debug-cat-file [OPTION]... TYPE FILE'), + inferrepo=True) def catfile(ui, repo, type=None, r=None, **opts): """cat a specific revision""" # in stdin mode, every line except the commit is prefixed with two @@ -344,5 +346,3 @@ cmd = ui.config("hgk", "path", "hgk") + " %s %s" % (optstr, " ".join(etc)) ui.debug("running %s\n" % cmd) util.system(cmd) - -commands.inferrepo += " debug-diff-tree debug-cat-file"