Mercurial: alias with arguments
问题 I want to create an alias so that when I run: hg pushbranch <<SOME_BRANCH>> it aliases to: hg push -b <<SOME_BRANCH>> Where SOME_BRANCH is the name of a branch I wish to push. I can create an alias in my .hgrc , but don't know how I could supply an argument to the alias. 回答1: From the hgrc help Positional arguments in the form of $1, $2, etc in the alias definition are expanded by Mercurial before execution. Thus, your alias definition, which will allow to push any branch, will be pushbranch