Unshelve is not restoring file changes

Anonymous avatarAnonymous 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

    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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.