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.
unknown
0acdaf898367 tip
0acdaf8983679e0aac16e811534eb49d7ee1f2b4 first
tip 1:8a3ca90d111dc784e6575d373105be12570e8776
first 0:0acdaf8983679e0aac16e811534eb49d7ee1f2b4
8a3ca90d111d tip
M a
8a3ca90d111d+ tip
0acdaf898367+ first
0acdaf8983679e0aac16e811534eb49d7ee1f2b4+ first
M a
8216907a933d tip
8216907a933d+8a3ca90d111d+ tip
M .hgtags
.hgtags:2: ignoring invalid tag
.hgtags:4: ignoring invalid tag
localtags:1: ignoring invalid tag
tip 4:fd868a874787a7b5af31e1675666ce691c803035
first 0:0acdaf8983679e0aac16e811534eb49d7ee1f2b4
changeset: 4:fd868a874787
.hgtags:2: ignoring invalid tag
.hgtags:4: ignoring invalid tag
localtags:1: ignoring invalid tag
tag: tip
user: test
date: Mon Jan 12 13:46:40 1970 +0000
summary: tags