working with MQ rejected files
Christian Boos
cboos at neuf.fr
Tue Mar 3 12:50:54 CST 2009
0000 vk wrote:
> On Tue, Mar 3, 2009 at 1:25 AM, Stefan Rusek <stefan at rusek.org
> <mailto:stefan at rusek.org>> wrote:
>
> On Tue, Mar 3, 2009 at 1:17 AM, 0000 vk <0000.vk at gmail.com
> <mailto:0000.vk at gmail.com>> wrote:
> > [...]
> >
> >> Each .rej file shows the parts of the diff that could not be
> applied
> >> to the file. I generally open up the .rej files in a text
> editor and
> >> manually make the changes in the .rej files. It generally isn't
> hard,
> >> though if you have a lot of conflicts, it can be quite a chore.
> >
> > but once you made the fix in the .rej file how do you apply it
> back? do you
> > qimport the .rej file? or manually merge the changes back?
> >
>
> Sorry my comment was more than a little ambiguous. I don't make any
> changes to the .rej files. I manually make the changes in the .rej
> file to the file being patched. After that is done, you simply run 'hg
> qrefresh'
>
>
> actually your comment turned out to be pretty useful. turns out emacs
> diff mode understands .rej files and allows you to edit them and apply
> individual hunks back to the original file with a simple key press
> combo. you can then qrefresh as needed. for smallish conflicts this
> works great.
Also, as nobody mentioned it yet, you should have a look at wiggle,
which is often good at guessing how to apply .rej files, as it tries to
do merges at the word level.
wiggle --replace file.py file.py.rej
You can then examine the result of the wiggle merge using 'hg diff file.py'.
Hope this helps! (and thanks for reminding me about Emacs diff mode ;-) )
-- Christian
More information about the Mercurial
mailing list