Rebase results are wrong in certain circumstances

Ruslan Yushchenko avatarRuslan Yushchenko created an issue

Let's consider following repository


Mecrurial command results in

#hg rebase -s B4 -d A4 --detach

(which is correct).

TorsoiseHG v2.1.3 (rebase with force detach) results in


This is wrong. Commit messages for both B4 and B4~ are equal, but diffs are different.

I presume, the merge completed right, but was detached from wrong parent.

Comments (5)

  1. Steve Borho
    • changed status to open

    You can see the exact rebase command we are running in the output log. All thg does is build the rebase command line and run it. Are you comparing the same Mercurial versions?

  2. Ruslan Yushchenko

    I could not see the command TortoiseHg uses for rebase. The output log is empty after rebase is done. I tied to rebase using both TortoiseHg 2.1.3 (Mecurial 1.9.2) and the newest TortoiseHG 2.1.4 (Mercurial 1.9.3). I use Windows so Mercurial version is the one that goes with TotoiseHG package.

    I attached an example repositories in which I encounter such behavior. Commit messages in repositories correspond directly to the example I had shown.

  3. Ruslan Yushchenko

    This is appears to be a Mercurial issue after all. If I use rebase in one step

    hg rebase -s 7 -d 4 --detach

    everything works. But If I use three step rebase with '--continue' it "forgets" the source and the destination.

    hg rebase -s 7 -d 4 --detach --config ui.merge=internal:fail
    hg resolve --all
    hg rebase --continue

    Sometimes it guesses right, but it my particular case it gives wrong results.

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.