Merge commits do only show files changed during the merge as changed (i.e. those with conflicts or similar). Bug or feature?
Steve Borho
steve at borho.org
Fri Nov 28 19:16:12 CST 2008
By default, hgk and hgtk log only show the diffs from the merge changeset to
the first parent.
When viewing merge changesets in hgtk log, it shows an 'other parent' toggle
button that will show you the diffs to the second parent.
On Fri, Nov 28, 2008 at 6:37 AM, <jens.lund at nordea.com> wrote:
>
> First a few steps to reproduce the problem. Then the question is at the
> end:
>
> ~/tmp$ hg init hgtest
> ~/tmp$ cd hgtest/
> ~/tmp/hgtest$ echo file1 > file1.txt
> ~/tmp/hgtest$ echo file2 > file2.txt
> ~/tmp/hgtest$ hg add .
> adding file1.txt
> adding file2.txt
> ~/tmp/hgtest$ hg ci -m "Initial checkin"
> ~/tmp/hgtest$ ls >> file1.txt
> ~/tmp/hgtest$ hg ci -m "Change in file1"
> ~/tmp/hgtest$ hg update 0
> 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> ~/tmp/hgtest$ ls >> file2.txt
> ~/tmp/hgtest$ hg ci -m "Change in file2, create another head"
> created new head
> ~/tmp/hgtest$ hg merge -r1
> 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> (branch merge, don't forget to commit)
> ~/tmp/hgtest$ hg ci -m "Merge"
> ~/tmp/hgtest$ hg log -v -r3
> changeset: 3:936aaa1c9975
> tag: tip
> parent: 2:1dd8a64b18b0
> parent: 1:741fd3bcb38d
> user: Jens Lund <jens.lund at nordea.com>
> date: Fri Nov 28 12:31:52 2008 +0100
> description:
> Merge
>
> What puzzles we is that the merge commit (3) show no files as changed
> even though file1.txt respective file2.txt is changed compared to one or
> the other parent. Only files changed during the merge will be shown.
> This I might understand in this context from the command line, but it
> has the side effect that in "hg view/hgk" or "hgtk log" in tortoisehg no
> differences are shown compared to the parents, and that I see as highly
> confusing because clearly "hg diff -r2 -r3" will show changes.
>
> Is the a bug or a feature in hg? In "hgk/hg view/hgtk log"?
>
> Best regards,
> Jens
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20081128/5dc609fd/attachment.htm
More information about the Mercurial
mailing list