rebase: add lock to cover whole dryrun process
Before this patch it is easy for another hg to interrupt
the dryrun. This patch make sure that dryrun will complete
without any interruption.
Differential Revision: https://phab.mercurial-scm.org/D3854
merge: add a 'keepconflictparent' argument to graft
Before this change, `merge.graft` was always dropping the "grafted" changeset
from the parent. This is impractical in case of conflict as the second parent
can be useful to help with conflict resolution.
We add a new boolean parameter to control this behavior. This will make using
`merge.graft` directly in shelve practicable.
Differential Revision: https://phab.mercurial-scm.org/D3692
unlinkpath: make empty directory removal optional (
issue5901) (
issue5826)
There are known cases where performing operations such as rebase from a
directory that is newly created can fail or at least lead to being in a
directory handle that no longer exists.
This is even reproducible by just doing something as simple as:
cd foo; hg rm *
The behavior is different if you use `hg addremove`, the directory is not
removed until we attempt to go back to the node after committing it:
cd foo; rm *; hg addremove; hg ci -m'bye foo'; hg co .^; hg co tip
Differential Revision: https://phab.mercurial-scm.org/D3859
py3: convert opts keys to bytes using pycompat.byteskwargs()
This fixes the py3 build broken due to
56b2074114b19e12abd9cd4c378d58b702232705.
Differential Revision: https://phab.mercurial-scm.org/D3853
revset: leverage orset() to flatten ancestor() arguments
This also makes orset() accept an empty argument because nullary ancestor()
call is valid. That's not the case for orset(), but should be okay.