I have a project versioned by Mercurial. Once, I ran a command such as...
$ find . -type f | xargs sed -i.bkp 's/my_func/another_func/'
...in this project. Then Mercurial just stopped to work on it:
$ hg status
abort: index 00changelog.i is corrupted!
The file 00changelog.i
did not contain the replaced string, and even if I move 00changelog.i.bkp
to 00changelog.i
the problem persisted. hg verify
didn't help either:
$ hg verify
abort: index 00changelog.i is corrupted!
I solved this problem by cloning the project from my remote repository in another directory and then copying .hg
from my cloned repository to the corrupted one. However, I wonder: is there another more practical way of solving it? BTW, why does this problem happens if the "corrupted" file is not even altered?
Note that there are two 00changelog.i files:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With