Issue #88 resolved

trouble doing pull --rebase with mq patch applied

Johan Samyn
created an issue

I experienced serious trouble when updating my thg-qt working repo, while a mq patch applied, and one of the pulled csets causes a conflict to one of the files in the patch.

1) from the commandline ("hg pull -r 9934 --rebase"):

No complaints, but the one conflicting line is simply filled with what was in the pulled cset. No conflict reporting, nor kdiff3 showing up to resolve.

2) using thg (pull button in toolbar):

Kdiff3 came up, and clicking the merge button reported one unsolved conflict. I solved it, and saved. But afterwards that file was simply not in the mq patch anymore. CHANGES LOST !? (no, a backup, luckily)

What am I doing wrong that my patch gets screwed up so badly ? Cause I have been pulling with rebase and solving conflicts before, without experiencing this.

PS: It concerns my patch for the qqueue dialog. And the conflicting file is repowidgets.py. Pulling cset 9934 makes this happen. I can attach the patch if you need it.

Comments (7)

  1. Steve Borho

    My guess is that you have found a bug in rebase --continue when used in conjunction with MQ.

    The difference from the command line is that the GUI adds --tool=internal:fail so *all* file merges are routed through the resolve dialog. If you enable the auto-merge feature, my guess is that it will work as well as the command line.

  2. Johan Samyn reporter

    FYI: mercurial.ini contains:

    ui.merge=kdiff3

    tortoisehg.autoresolve=True

    And I had to explicitely click the Kdiff3 "merge current file" button to get anything done.

  3. Steve Borho

    I was unable to reproduce the problem, but your last statement may be an important clue. Were you running thg from source or from a binary package?

    If you were running from source, it is likely that kdiff3 was not configured properly as a merge tool. Mercurial's default arguments to merge tools do not work with kdiff3. One side-effect is it doesn't merge automatically, another is it writes the merged outputs to a temp file, so the merge results are lost (leaving you with the original file contents, which I can easily see removing the file from the patch).

    I work around this on my development machines by adding to my Mercurial.ini:

    %include C:\thg-winbuild\thg\contrib\mergetools.rc

  4. Johan Samyn reporter

    I was indeed working from source. And yes, your suggestion did it. Also explains why the titles above the panes in kdiff3 showed such weird info. Thanks !

  5. Log in to comment