Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
13803:e380964d53f8 | 13804:7dc2bd4c0dc8 |
---|---|
2987 if (modheads <= 1 or len(repo.branchheads()) == 1) or checkout: | 2987 if (modheads <= 1 or len(repo.branchheads()) == 1) or checkout: |
2988 return hg.update(repo, checkout) | 2988 return hg.update(repo, checkout) |
2989 else: | 2989 else: |
2990 ui.status(_("not updating, since new heads added\n")) | 2990 ui.status(_("not updating, since new heads added\n")) |
2991 if modheads > 1: | 2991 if modheads > 1: |
2992 if (len(repo.branchheads()) > 1): | 2992 currentbranchheads = len(repo.branchheads()) |
2993 if currentbranchheads == modheads: | |
2993 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) | 2994 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) |
2995 elif currentbranchheads > 1: | |
2996 ui.status(_("(run 'hg heads .' to see heads, 'hg merge' to merge)\n")) | |
2994 else: | 2997 else: |
2995 ui.status(_("(run 'hg heads' to see heads)\n")) | 2998 ui.status(_("(run 'hg heads' to see heads)\n")) |
2996 else: | 2999 else: |
2997 ui.status(_("(run 'hg update' to get a working copy)\n")) | 3000 ui.status(_("(run 'hg update' to get a working copy)\n")) |
2998 | 3001 |