patch: don't look for headers in diff lines
If you have a diff line that matches a header line, the patch splitter
currently breaks your patch at this line. For example a line like:
+key: value
This can lead to "malformed patch" exceptions. Now fixed.
localrepo: add desc parameter to transaction
All callers to localrepo.transaction() must supply a transaction description.
The description and the existing repository tip are then stored
(transactionally) into .hg/undo.desc; where rollback can later find it.
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
mq: use util.unlink instead of os.unlink and os.removedirs
If, on Windows, your repository and working copy are in a reparse point and you
use os.removedirs, you will remove non-empty reparse points, disabling the
reparse point. See @
fa901423ac23.