tests: .hg/merge is a directory, so use `test -d`
This part of test-rebase-interrupts.t would have passed before the fix
in
a580b2d65ded (rebase: make sure merge state is cleaned up for no-op
rebases (
issue5494), 2017-05-18).
Differential Revision: https://phab.mercurial-scm.org/D2713
rebase: only store collapse message once
The message is determined by the user passing --message or --log when
the rebase is started. There's no need to write it to a file for each
rebased commit; writing it once at the start of the rebase is enough.
Differential Revision: https://phab.mercurial-scm.org/D2712
rebase: collapse two nested if-conditions
Also change the order since it feel to me like it's more about
--collapse than it is about --keep.
Differential Revision: https://phab.mercurial-scm.org/D2711
rebase: reduce scope of "dsguard" variables a bit
Differential Revision: https://phab.mercurial-scm.org/D2710