unshelve: don't commit unknown files during unshelve (
issue4113)
Previously, unshelve would temporarily commit unknown files (via addremove) in
an attempt to allow unshelving into unknown files. This produced unexpected
results, like the file time stamp changing and a .i file being created.
This change makes it no longer use addremove. It ignores unknown files
completely. If an unshelve would overwrite an unknown file, the unknown file is
moved to *.orig
The shelve continue/abort format is changed, but it just removes stuff from the
end of the file, so it can still read the old format.
Create an empty repo:
$ hg init a
$ cd a
Try some commands:
$ hg log
$ hg grep wah
[1]
$ hg manifest
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
Check the basic files created:
$ ls .hg
00changelog.i
requires
store
Should be empty:
$ ls .hg/store
Poke at a clone:
$ cd ..
$ hg clone a b
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd b
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
$ ls .hg
00changelog.i
hgrc
requires
store
Should be empty:
$ ls .hg/store
$ cd ..