##// END OF EJS Templates
hgk: define inferrepo in command decorator
Gregory Szorc -
r21783:82bf4d89 default
parent child Browse files
Show More
@@ -50,7 +50,8 b" testedwith = 'internal'"
50 ('s', 'stdin', None, _('stdin')),
50 ('s', 'stdin', None, _('stdin')),
51 ('C', 'copy', None, _('detect copies')),
51 ('C', 'copy', None, _('detect copies')),
52 ('S', 'search', "", _('search'))],
52 ('S', 'search', "", _('search'))],
53 ('hg git-diff-tree [OPTION]... NODE1 NODE2 [FILE]...'))
53 ('hg git-diff-tree [OPTION]... NODE1 NODE2 [FILE]...'),
54 inferrepo=True)
54 def difftree(ui, repo, node1=None, node2=None, *files, **opts):
55 def difftree(ui, repo, node1=None, node2=None, *files, **opts):
55 """diff trees from two commits"""
56 """diff trees from two commits"""
56 def __difftree(repo, node1, node2, files=[]):
57 def __difftree(repo, node1, node2, files=[]):
@@ -145,7 +146,8 b' def base(ui, repo, node1, node2):'
145
146
146 @command('debug-cat-file',
147 @command('debug-cat-file',
147 [('s', 'stdin', None, _('stdin'))],
148 [('s', 'stdin', None, _('stdin'))],
148 _('hg debug-cat-file [OPTION]... TYPE FILE'))
149 _('hg debug-cat-file [OPTION]... TYPE FILE'),
150 inferrepo=True)
149 def catfile(ui, repo, type=None, r=None, **opts):
151 def catfile(ui, repo, type=None, r=None, **opts):
150 """cat a specific revision"""
152 """cat a specific revision"""
151 # in stdin mode, every line except the commit is prefixed with two
153 # in stdin mode, every line except the commit is prefixed with two
@@ -344,5 +346,3 b' def view(ui, repo, *etc, **opts):'
344 cmd = ui.config("hgk", "path", "hgk") + " %s %s" % (optstr, " ".join(etc))
346 cmd = ui.config("hgk", "path", "hgk") + " %s %s" % (optstr, " ".join(etc))
345 ui.debug("running %s\n" % cmd)
347 ui.debug("running %s\n" % cmd)
346 util.system(cmd)
348 util.system(cmd)
347
348 commands.inferrepo += " debug-diff-tree debug-cat-file"
General Comments 0
You need to be logged in to leave comments. Login now