mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
bb69bca6b1
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
20 lines
340 B
Perl
20 lines
340 B
Perl
Setup
|
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
> [extensions]
|
|
> treedirstate=
|
|
> [treedirstate]
|
|
> useinnewrepos=True
|
|
> EOF
|
|
|
|
$ 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
|