Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 13804:7dc2bd4c0dc8
pull: new output message when there are multiple branches
Pull outputs a slightly new message when there are multiple branches and
the current branch has many heads:
(run 'hg heads .' to see heads, 'hg merge' to merge)
This message adds the "." in hg heads to encourage you to consider only the
current branch's heads.
author | Kevin Berridge <kevin.w.berridge@gmail.com> |
---|---|
date | Mon, 28 Mar 2011 20:56:56 -0400 |
parents | e380964d53f8 |
children | 3c43dd85d3d1 |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Mar 11 20:43:12 2011 -0500 +++ b/mercurial/commands.py Mon Mar 28 20:56:56 2011 -0400 @@ -2989,8 +2989,11 @@ else: ui.status(_("not updating, since new heads added\n")) if modheads > 1: - if (len(repo.branchheads()) > 1): + currentbranchheads = len(repo.branchheads()) + if currentbranchheads == modheads: ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) + elif currentbranchheads > 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: