push: only list non-obsolete heads in ui message

This commit is contained in:
Sean Farley 2015-02-12 13:24:41 -08:00
parent 5f5b92c7c3
commit efe7db9db1

View File

@ -221,7 +221,8 @@ def expushdiscoverybookmarks(pushop):
revs.remove(rev)
if revs:
msg = _("push would create new anonymous heads (%s)" %
', '.join([short(r) for r in revs]))
', '.join([short(r) for r in revs
if not repo[r].obsolete()]))
hint = _("use 'hg push --to NAME' to create a new remote bookmark")
raise util.Abort(msg, hint=hint)