mergestate: use dirstate.update_file API in recordupdates()

Let's use the new single function to replace multiple different functions. This
is part of dirstate API refactor to make it more clearer and generic so that it
can be replicated in Rust.

Differential Revision: https://phab.mercurial-scm.org/D11077
16 jobs for topic/default/dirstate-update-file-API in 68 minutes and 5 seconds (queued for 40 minutes and 23 seconds)
Status Job ID Name Coverage
  Tests
manual check-pytype-py3 #223604
allowed to fail manual
passed checks-py2 #223591

00:03:19

passed checks-py3 #223592

00:03:05

passed rust-cargo-test-py2 #223593

00:01:50

passed rust-cargo-test-py3 #223594

00:01:45

passed test-py2 #223595

00:29:02

failed test-py2-chg #223602

00:59:04

passed test-py2-pure #223597

00:32:16

passed test-py2-rust #223599

00:28:55

passed test-py3 #223596

00:15:05

passed test-py3-chg #223603

00:08:38

passed test-py3-pure #223598

00:14:26

passed test-py3-rhg #223601

00:16:13

passed test-py3-rust #223600

00:16:00

manual windows-py3 #223605
windows allowed to fail manual
 
  Phabricator
skipped phabricator-refresh #223606
 
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-subrepo-git.t: timed out
# Ran 889 tests, 95 skipped, 1 failed.
python hash seed: 231753800
Cleaning up file based variables
ERROR: Job failed: exit code 1