[Bug 4522] New: Sequential graft operations result in wrong graft information

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Mon Feb 2 11:22:38 UTC 2015


http://bz.selenic.com/show_bug.cgi?id=4522

          Priority: normal
            Bug ID: 4522
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Sequential graft operations result in wrong graft
                    information
          Severity: bug
    Classification: Unclassified
                OS: All
          Reporter: jahn at mentzdv.de
          Hardware: All
            Status: UNCONFIRMED
           Version: 3.2.3
         Component: Mercurial
           Product: Mercurial

When changeset A is grafted from somebranch2 to somebranch1, the resulting
intermediate changeset B keeps track of the original changeset A (see "hg log
--debug"). When this intermediate changeset B is then grafted from somebranch1
to the default branch, the final changeset C looks like it has been directly
grafted from the original changeset A.

In situations where the intermediate changeset B contains changes that were
done while resolving conflicts, the information that the final changeset C has
been grafted from B and not A seems to be important.

How to reproduce:

  cd %TEMP%
  mkdir test
  cd test
  hg init
  echo text1 > somefile
  hg add somefile
  hg commit -m "test file" somefile
  hg branch somebranch1
  hg commit -m "first branch"
  hg update default
  hg branch somebranch2
  hg commit -m "second branch"
  echo text2 >> somefile
  hg commit -m "change in second branch" somefile
  hg update somebranch1
  hg graft 3
  hg log --rev tip --debug

This shows something similar to this (some fields omitted):

  changeset:   4:4c96cc52ff408e14142a9a811097fb54dace47d6
  branch:      somebranch1
  parent:      1:97834d0212dee317312884eec0c2a1c07c69098b
  files:       somefile
  extra:       source=9836b522052df79e483adc091e259204f65d8636
  description: change in second branch

Now continue and graft the intermediate changeset (4):

  hg update default
  hg graft 4
  hg log --rev tip --debug

This shows something similar to this (some fields omitted):

  changeset:   5:c9a3a9ab9e7b895c8e68cbdd453221281f64fc80
  parent:      0:7efbac457234497aef64f8789ca07889d79febab
  files:       somefile
  extra:       source=9836b522052df79e483adc091e259204f65d8636
  description: change in second branch

It looks like the final changeset (5) has been grafted from the same source
(the original changeset 3).

As a result the visualization of graft operations in the TortoiseHg workbench
is also affected.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list