# HG changeset patch # User Gregory Szorc # Date 1399267847 25200 # Node ID c85a0c3537b2ada9f53ab4fa582414eb7ffb1246 # Parent a730b002c5db129568a0e4800c1733c31d31e886 mq: define inferrepo in command decorator diff -r a730b002c5db -r c85a0c3537b2 hgext/mq.py --- a/hgext/mq.py Sun May 04 22:23:45 2014 -0700 +++ b/hgext/mq.py Sun May 04 22:30:47 2014 -0700 @@ -2333,7 +2333,8 @@ @command("qcommit|qci", commands.table["^commit|ci"][1], - _('hg qcommit [OPTION]... [FILE]...')) + _('hg qcommit [OPTION]... [FILE]...'), + inferrepo=True) def commit(ui, repo, *pats, **opts): """commit changes in the queue repository (DEPRECATED) @@ -2416,7 +2417,8 @@ ('d', 'date', '', _('add "Date: " to patch'), _('DATE')) ] + commands.walkopts + commands.commitopts, - _('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...')) + _('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...'), + inferrepo=True) def new(ui, repo, patch, *args, **opts): """create a new patch @@ -2464,7 +2466,8 @@ ('d', 'date', '', _('add/update date field in patch with given date'), _('DATE')) ] + commands.walkopts + commands.commitopts, - _('hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...')) + _('hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...'), + inferrepo=True) def refresh(ui, repo, *pats, **opts): """update the current patch @@ -2499,7 +2502,8 @@ @command("^qdiff", commands.diffopts + commands.diffopts2 + commands.walkopts, - _('hg qdiff [OPTION]... [FILE]...')) + _('hg qdiff [OPTION]... [FILE]...'), + inferrepo=True) def diff(ui, repo, *pats, **opts): """diff of the current patch and subsequent modifications @@ -3456,5 +3460,3 @@ 'qseries.guarded': 'black bold', 'qseries.missing': 'red bold', 'qseries.unapplied': 'black bold'} - -commands.inferrepo += " qnew qrefresh qdiff qcommit"