qrefresh a single file with other modifications?

John Jefferies j.jefferies at ntlworld.com
Sun May 22 20:17:47 UTC 2011


On 22/05/2011 20:04, Idan Kamara wrote:
> Hi,
>
> This seems pretty basic so I may be missing something.
> Can I somehow qrefresh a single file if I have other modifications in 
> my working copy without discarding the changes I already have in the 
> patch?
>
> The following don't work:
>   $ hg qrefresh file
>   $ hg qrefresh -I file
>
> Both remove other changes from the patch.

Yes, this works:

- qnew old-patch-update -I file
- qnew new-patch (for all the other working files)
- qpop to your old patch
- if necessary, reorder the patch queue so the update patch is the first 
to be pushed.
- qfold the update patch (into the old patch).


Another method that feels less clean:

- qnew new-patch -X file
- rename your file.
- update
- qpop to the old patch.
- replace your new file.
- qrefresh

[I hope I've got that right from memory.]

John




More information about the Mercurial mailing list