sapling/eden/scm/tests/test-dirstate-rebuild.t
Jun Wu 8fe79db4b1 context: do not warn broken dirstate repetitively
Summary: This makes the output less verbose.

Reviewed By: DurhamG

Differential Revision: D24411259

fbshipit-source-id: 50b175f2e31ffda62e78dd226775edaf53893bce
2020-10-20 15:24:28 -07:00

41 lines
779 B
Perl

#chg-compatible
$ shorttraceback
$ newrepo
$ drawdag << 'EOS'
> B
> |
> A
> EOS
$ hg up -q $B
Dirstate rebuild should work with a broken dirstate
Broken by having an incomplete p2
$ enable blackbox
# Assign to 'x' to hide the return value output in Python 3
>>> x = open('.hg/dirstate', 'a').truncate(25)
$ hg debugrebuilddirstate
$ hg log -r . -T '{desc}\n'
B
Broken by deleting the tree
$ rm -rf .hg/treestate
$ hg debugrebuilddirstate
warning: failed to inspect working copy parent
warning: failed to inspect working copy parent (?)
$ hg log -r . -T '{desc}\n'
B
Dirstate rebuild should work with sparse
$ enable sparse
$ hg sparse -I A
$ rm .hg/dirstate
$ hg debugrebuilddirstate -r $B
$ hg log -r . -T '{desc}\n'
B