mirror of
https://github.com/facebook/sapling.git
synced 2024-10-16 19:57:18 +03:00
16ae892817
Summary: The old code was counting on `dirstate.rebuild` to setparent. However, that could be too late. Namely, the sparse extension would expect dirstate p1 to be available to load the correct sparse profile. So let's set dirstate parent early before calling dirstate rebuild. Reviewed By: DurhamG Differential Revision: D9375196 fbshipit-source-id: baed4a5ab329344ff3bb0b323046b05aece65f53
36 lines
596 B
Perl
36 lines
596 B
Perl
$ 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
|
|
>>> 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
|
|
$ 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
|