Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 13803:e380964d53f8
pull: don't suggest running hg merge when new heads are on different branches
After a pull when new heads are added but no head is added on the current
branch, the "run 'hg merge'" message can be misleading. This patch doesn't
output the merge message in that scenario.
author | Kevin Berridge <kevin.w.berridge@gmail.com> |
---|---|
date | Fri, 11 Mar 2011 20:43:12 -0500 |
parents | 0f9282dc87f8 |
children | 7dc2bd4c0dc8 |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Mar 30 09:49:45 2011 +0100 +++ b/mercurial/commands.py Fri Mar 11 20:43:12 2011 -0500 @@ -2989,7 +2989,10 @@ else: ui.status(_("not updating, since new heads added\n")) if modheads > 1: - ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) + if (len(repo.branchheads()) > 1): + ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) + else: + ui.status(_("(run 'hg heads' to see heads)\n")) else: ui.status(_("(run 'hg update' to get a working copy)\n"))