sapling/tests/test-treestate-upgrade.t
Jun Wu fa3024b2ce treestate: fix state handling when upgrading to treestate
Summary:
`size = -1` does not have special meaning in dirstate. Only `size = -2` is
special.

Reviewed By: DurhamG

Differential Revision: D8623318

fbshipit-source-id: 7293a7b492ba44cb8ffc49ce54a908e9612148e2
2018-06-25 15:24:20 -07:00

19 lines
486 B
Perl

Create a treedirstate repo
$ hg init repo1 --config format.dirstate=1
$ cd repo1
$ touch x
$ hg ci -m init -A x
Set the size field to -1:
$ hg debugshell --command 'with repo.wlock(), repo.lock(), repo.transaction("dirstate") as tr: repo.dirstate.normallookup("x"); repo.dirstate.write(tr)'
$ hg debugstate
n 0 -1 unset x
Upgrade to v2 does not turn "n" into "m":
$ hg debugtree v2
$ hg debugstate
n 0 -1 unset x