Read about our upcoming Code of Conduct on this issue

fix: again allow formatting the working copy while merging

I forgot about unfinished merges (I think I was thinking only about
unfinished merge conflicts) when I wrote
https://phab.mercurial-scm.org/D11209. As a coworker (hg contributor
dploch) reported to me, this led to `hg fix --working-dir` failing
when you have an uncommitted merge. The fix is trivial: just move the
assertion to just before the call to `scmutil.movedirstate()` where it
actually matters.

Differential Revision: https://phab.mercurial-scm.org/D11376

--HG--
branch : stable
17 jobs for 5.9.1 in 62 minutes and 21 seconds (queued for 2 seconds)
latest
Status Name Job ID Coverage
  Tests
passed check-pytype-py3 #242746

00:18:14

passed checks-py2 #242733

00:03:31

passed checks-py3 #242734

00:02:57

passed rust-cargo-test-py2 #242735

00:03:05

passed rust-cargo-test-py3 #242736

00:02:02

passed test-py2 #242737

00:34:46

failed test-py2-chg #242744

00:52:33

passed test-py2-pure #242739

00:29:43

passed test-py2-rust #242741

00:31:01

passed test-py3 #242738

00:24:38

passed test-py3-chg #242745

00:10:40

passed test-py3-pure #242740

00:15:39

passed test-py3-rhg #242743

00:19:33

passed test-py3-rust #242742

00:23:08

passed windows-py3 #242747
windows

01:02:17

passed windows-py3-pyox #242748
windows

00:51:33

 
  Phabricator
skipped phabricator-refresh #242749
 
Name Stage Failure
failed
test-py2-chg Tests
Skipped test-symlinks.t#dirstate-v2: missing feature: Using the Rust extensions
Skipped test-update-atomic.t: system supports running with chg
Skipped test-verify-repo-operations.py: missing feature: allow slow tests (use --allow-slow-tests)
Skipped test-wireproto-command-capabilities.t: system supports running with chg
Failed test-chg.t: output changed
# Ran 889 tests, 96 skipped, 1 failed.
python hash seed: 3798447557
Cleaning up file based variables
ERROR: Job failed: exit code 1