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.
<table class="parity#parity#" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="right" width="15%"><b>#date|age# ago: </b></td>
<td><b><a href="?cs=#node|short#">#desc|strip|firstline|escape#</a></b></td></tr>
<tr>
<td align="right">revision #filerev#: </td>
<td><a href="?f=#filenode|short#;file=#file|urlescape#">#filenode|short#</a>
<a href="?fd=#node|short#;file=#file|urlescape#">(diff)</a>
<a href="?fa=#filenode|short#;file=#file|urlescape#">(annotate)</a>
</td></tr>
#rename%filelogrename#
<tr>
<td align="right">author: </td>
<td>#author|obfuscate#</td></tr>
<tr>
<td align="right">date: </td>
<td>#date|date# (#date|age# ago)</td></tr>
</table>