Fix hg push and hg push -r sometimes creating new heads without --force.
Fixing issue179.
The algorithm checks if there not more new heads on the remote side than heads
which become non-heads due to getting children.
Pushing this repo:
m
/\
3 3a|
|/ /
2 2a
|/
1
to a repo only having 1, 2 and 3 didn't abort requiring --force before.
Added test cases for this and some doc strings for used methods.
#header#
<title>#repo|escape#: Changelog</title>
<link rel="alternate" type="application/rss+xml"
href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / changelog
</div>
<form action="#">
<div class="search">
<input type="hidden" name="repo" value="#repo|escape#" />
<input type="hidden" name="style" value="gitweb" />
<input type="hidden" name="cmd" value="changelog" />
<input type="text" name="rev" />
</div>
</form>
</div>
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | changelog | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
<br/>
#changenav%naventry#<br/>
</div>
#entries%changelogentry#
<div class="page_nav">
#changenav%naventry#<br/>
</div>
#footer#