I was working on adding interactive mode to hg unshelve
. Until now, we cannot unshelve selected changes only from the stored shelve. We already have an interactive mode in hg shelve
. I sent a patch[1] to add interactive mode to unshelve
I started with adding selected files only as a baby step. I borrowed a function from uncommit
extension called _commitfiltered()
. What it does was it created a new changeset excluding the given files. I modified it to include the given files to make it work for unshelve
. This function had the following syntax by default:
Then, I started working directly by looking at the interactive mode on shelve
. I had to pass an interactive commit function which does cmdutil.dorecord()
. I had to make it work for all corner cases possible. One of the important cases which I missed initially was unshelve on interactive mode with conflicts. Later, I made this work for all cases.