sapling/tests/test-debugrebuilddirstate-corrupt.t
Dino Wernli bb69bca6b1 Make rebuilddirstate not crash due to existing corrupt dirstate files.
Summary: This change minimally addresses the issue that `debugrebuilddirstate` can crash if the dirstate file is very corrupt.

Reviewed By: markbt

Differential Revision: D7028370

fbshipit-source-id: 72fc7a2900a8bc1bb5f062454530b4fc4c806f09
2018-04-13 21:51:20 -07:00

13 lines
227 B
Perl

Setup
$ hg init repo
$ cd repo
$ echo base > base
$ hg add base
$ hg commit -m "base"
Deliberately corrupt the dirstate.
$ dd if=/dev/zero bs=4096 count=1 of=.hg/dirstate 2> /dev/null
$ hg debugrebuilddirstate