test-hgwebdir: correctly include '-' in sed expression.
'\' can't be used to escape '-' from being interpreted as a range,
so put it at the end.
localrepo: refactor prepush logic
Simplifies the prepush check logic and makes it a lot more direct and
comprehensible. Instead of comparing the total local vs. remote head count, it
compares the number of new vs. removed heads.
partial backout of
1e819576e926 and add tests (
issue2131)
The tests are due to Peter Arrenbrecht