问题
I'm thinking in git terms here ... is it possible to see how many local commits you have made ahead of the origin? As in git, if you type git status it will tell you
Your branch is ahead of blah by blah blah
Is there a similar thing in Mercurial? I know there is hg outgoing but I don't want a command that hits the server as I want to put the output in my prompt (like the commonly implemented bashrc funciton num_git_commits_ahead)
回答1:
I think hg summary --remote will give you what you want, but it will give you a bit extra, too.
来源:https://stackoverflow.com/questions/6503489/mercurial-show-number-of-commits-ahead-of-origin