githelp: fix crash in mergebase

Summary: `_` does not take two arguments while `ui.status` does.

Test Plan: Added a test case

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4010079

Signature: t1:4010079:1476298648:81e678fbe433aa8cca8b03c9eba50d9b78bbc9bb

Blame Revision: D2811887
This commit is contained in:
Jun Wu 2016-10-12 19:47:42 +01:00
parent 68f61c682a
commit 82b158ed59
2 changed files with 10 additions and 2 deletions

View File

@ -647,8 +647,8 @@ def mergebase(ui, repo, *args, **kwargs):
cmd = Command("log -T '{node}\\n' -r 'ancestor(%s,%s)'"
% (args[0], args[1]))
ui.status(_('NOTE: ancestors() is part of the revset language.\n',
"Learn more about revsets with 'hg help revsets'\n\n"))
ui.status(_('NOTE: ancestors() is part of the revset language.\n'),
_("Learn more about revsets with 'hg help revsets'\n\n"))
ui.status((str(cmd)), "\n")
def mergetool(ui, repo, *args, **kwargs):

View File

@ -241,3 +241,11 @@ githelp for apply with no options
githelp for apply with directory strip custom
$ hg githelp -- apply -p 5
hg import -p 5
git merge-base
$ hg githelp -- git merge-base --is-ancestor
ignoring unknown option --is-ancestor
NOTE: ancestors() is part of the revset language.
Learn more about revsets with 'hg help revsets'
hg log -T '{node}\n' -r 'ancestor(A,B)'