hg: perform update after pulling during clone with share (
issue5103)
This is a graft of
60adda1a0188 and
a4692267bc2d from the default
branch. Combined, they address a bug with pooled shared storage where
an update may not update to the most recent revision when performing
a `hg clone`.
The patches should have been written against the stable branch in
the beginning. I screwed up.
Test for changeset ba7c74081861
(update dirstate correctly for non-branchmerge updates)
$ hg init a
$ cd a
$ echo a > a
$ hg add a
$ hg commit -m a
$ cd ..
$ hg clone a b
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd a
$ hg mv a b
$ hg commit -m move
$ echo b >> b
$ hg commit -m b
$ cd ../b
$ hg pull ../a
pulling from ../a
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 1 files
(run 'hg update' to get a working copy)
$ hg update
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ cd ..