Search code examples
mercurialmercurial-queue

Mercurial: Revert "commit action" changes


Suppose I have made a change to a file, hg status show it as modified.

Now I want to commit. Before I can do so I accidentially hg remove my file. Mercurial now would remove my file on the next commit, hg revert would retain it from removal, my changes would be lost however.

Is exporting a patch and then importing it on top of a MQ my only option to put my file back into "modified" state?


Solution

  • I am not sure about that but try adding it back with hg add.

    And you can simply export and apply a patch without MQ.