Summary:
`wc` in OSX has different padding behavior that breaks the test:
```
$ wc -c .hg/store/00changelog* .hg/store/00manifest* | sort
- 99 .hg/store/00manifest.d
- 110 .hg/store/00changelog.d
- 128 .hg/store/00changelog.i
- 128 .hg/store/00manifest.i
- 465 total
+ 99 .hg/store/00manifest.d
+ 110 .hg/store/00changelog.d
+ 128 .hg/store/00changelog.i
+ 128 .hg/store/00manifest.i
+ 465 total
```
This patch fixes it.
Test Plan: The fix was verified manually on an OS X machine.
Reviewers: #mercurial, durham
Reviewed By: durham
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4872689
Signature: t1:4872689:1491954172:92178178deea88ec3545c42ad0cdecc8099a1db6
Summary:
We sometimes get reports about corrupted repos. Usually the corrupted part
is just at the end of changelog or manifest.
Truncating them manually works but people need to be very careful. This
extension is like the manual fix but automatized.
Test Plan:
Run `hg debugfixcorrupt --no-dryrun` on a reported corrupted repo and check
it truncates files correctly and the repo passes `hg verify` afterwards.
Reviewers: #mercurial, durham, stash
Reviewed By: stash
Subscribers: stash, rmcelroy, durham, lcharignon, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3408396
Signature: t1:3408396:1491897232:fc17a105124b568963441adfec97e26735df3258