I had a file main.py that was committed to mercurial but then accidentally reverted and deleted.
I notice a binary file exists .hg/store/data/main.py.i Is it possible to restore the original file from this?
Unfortunately, as I said on the mailing list, it is not possible to undo a deletion or revertion like that.
The -C
option to the hg update command
says specifically:
options: -C --clean discard uncommitted changes (no backup) -c --check update across branches if no uncommitted changes -d --date DATE tipmost revision matching date -r --rev REV revision --mq operate on patch repository
So the changes to that file is lost.
What you can do is get the file out from a specific revision, but it sounds to me as you had uncommitted changes to the file and the changes and/or file was completely deleted.
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