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#: changeset #node|short#</title>
</head>
<body>
<div class="buttons">
<a href="?cl=#rev#">changelog</a>
<a href="?cmd=tags">tags</a>
<a href="?mf=#manifest|short#;path=/">manifest</a>
<a href="?cs=#node|short#;style=raw">raw</a>
#archives%archiveentry#
</div>
<h2>changeset: #desc|strip|escape|firstline#</h2>
<table id="changesetEntry">
<tr>
<th class="changeset">changeset #rev#:</th>
<td class="changeset"><a href="?cs=#node|short#">#node|short#</a></td>
</tr>
#parent%changesetparent#
#child%changesetchild#
#changesettag#
<tr>
<th class="author">author:</th>
<td class="author">#author|obfuscate#</td>
</tr>
<tr>
<th class="date">date:</th>
<td class="date">#date|date# (#date|age# ago)</td></tr>
<tr>
<th class="files">files:</th>
<td class="files">#files#</td></tr>
<tr>
<th class="description">description:</th>
<td class="description">#desc|strip|escape|addbreaks#</td>
</tr>
</table>
<div id="changesetDiff">
#diff#
</div>
#footer#