1. Oleg Oshmyan
  2. hgshelve
  3. Issues
Issue #11 resolved

Unshelve is not restoring file changes

Anonymous created an issue

I had been using shelve successfully but when I did: hg shelve /path/to/file/a /path/to/file/b

it did correctly store those changes in: .hg/shelve

however when I do: hg unshelve

it reports that its restoring backup files but the diff is not applied to the files and the .hg/shelve file not removed; its as if the command does nothing. I've tried hg unshelve with no files, one of the files, both of the files, all with the same results.

The only thing I did differently this time was in the interactive hunk selection I hit 'a' instead of hitting 'Y' for each change.

I tried the -v option but that printed no extra information. I can manually apply the diff file but wanted to know if this has happened before or if I've done something wrong.

Please help.

Comments (14)

  1. Anonymous

    I have the same problem. I can shelve changes just fine, but unshelve always fails. So this extension is basically broken for now.

    I tried the simple patch 6ded6243bde2 from Slug, which fixed the problem. It would be great if the official version could get updated to fix this.

  2. knutae

    Same problem here, and the fork mentioned above does not seem to fix the problem for me. IIRC the changes were shelved using a command like "hg shelve -I <pattern> --all"

    Workaround: I restored my shelved changes using "hg unshelve -i | hg patch --no-commit -"

  3. Lars Ivar Igesund

    I had the same problem for a little while - presumably hg itself was upgraded along with my distribution, causing some mismatch. After I updated my hgshelve install to the latest in the repo, unshelving worked fine again.

  4. Oleg Oshmyan repo owner

    Yes. This is because the fix is aimed specifically at Mercurial 1.9, which changed a part of the API that is used by hgshelve. You can upgrade your copy of Mercurial by running this command:

    sudo easy_install mercurial
    
  5. Log in to comment