Mercurial Queues are fixes, and patches do not know anything about file renames. Is this the reason that Mercurial Queues do not support file renaming, or am I doing something to rename a file incorrectly? I worked on the patch queue, changing only one file named foo . Now I go back to patch 4 and rename the file via hg mv :
hg qpop 4
I get the following error:
unable to find 'foo' for patching 1 out of 1 hunks FAILED -- saving rejects to file foo.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh 5.diff
So how do I do to handle renaming files in Mercurial Queues? Mercurial fixes the renaming of files for any reason (as without this, it will lose the entire history of editing the file after renaming).
Update
Just noticed that hg histedit folding changesets and hg collapse also lose information about renaming files, the file is displayed as new rather than renamed, and I think this is for the same reason. It seems that Mercurial does not flush private sets of changes without losing this information?
Update 2
It was found that folding private sets of changes without losing renaming information is possible using hg rebase and its --collapse option, for example. hg rebase -s 5 -d 4 --collapse . The problem is that other commands must recreate the renaming of the information, it is empty, but with the hg rebase there is at least a way to achieve the desired result.
source share