[Bug 6388] New: Results of `hg evolve` differ in the non-interrupted and interrupted case

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Sun Jul 26 03:49:26 UTC 2020


https://bz.mercurial-scm.org/show_bug.cgi?id=6388

            Bug ID: 6388
           Summary: Results of `hg evolve` differ in the non-interrupted
                    and interrupted case
           Product: Mercurial
           Version: default branch
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: evolution
          Assignee: bugzilla at mercurial-scm.org
          Reporter: me at manueljacob.de
                CC: mercurial-devel at mercurial-scm.org,
                    pierre-yves.david at ens-lyon.org
    Python Version: ---

In the non-interrupted case, the hash of the predecessor is stored in the
"rebase_source" extra (by the _relocatecommit() function), while in the
interrupted case, it’s stored in the "source" extra (by the
_completerelocation() function).

Test case (also at
https://foss.heptapod.net/mercurial/evolve/-/commit/6b7d194041f4e03c0acd457603b0dd2d9045fb73):

#testcases nointerrupt interrupt

  $ . $TESTDIR/testlib/pythonpath.sh

  $ cat >> $HGRCPATH <<EOF
  > [alias]
  > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
  > [extensions]
  > evolve =
  > EOF

#if nointerrupt
  $ cat > tmp.sh <<EOF
  > hg evolve --tool :other
  > EOF
#else
  $ cat > tmp.sh <<EOF
  > hg evolve 2>&1 | grep -v 'merging \|unresolved merge conflicts\|see '
  > hg resolve --all --tool :other -q 2>&1 | grep -v 'continue'
  > hg evolve --continue -q
  > EOF
#endif

Setting up the repo

  $ hg init repo
  $ cd repo
  $ echo ".*\.orig" > .hgignore
  $ hg add .hgignore
  $ hg ci -m "added hgignore"
  $ for ch in a b; do echo foo>$ch; hg add $ch; hg ci -qm "added "$ch; done

  $ hg glog
  @  2:b1661037fa25 added b
  |   () draft
  o  1:c7586e2a9264 added a
  |   () draft
  o  0:8fa14d15e168 added hgignore
      () draft

  $ hg up c7586e2a9264 -q
  $ echo bar > b
  $ hg add b
  $ hg amend
  1 new orphan changesets

  $ . $TESTTMP/tmp.sh
  move:[2] added b
  atop:[3] added a

  $ hg glog
  o  4:82e752d13332 added b (nointerrupt !)
  o  4:87f748868183 added b (interrupt !)
  |   () draft
  @  3:53b632d203d8 added a
  |   () draft
  o  0:8fa14d15e168 added hgignore
      () draft

  $ hg log -T '{join(extras, "\n")}\n' -r 4
  branch=default
  rebase_source=b1661037fa25511d0b7ccddf405e336f9d7d3424 (nointerrupt !)
  source=b1661037fa25511d0b7ccddf405e336f9d7d3424 (interrupt !)

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


More information about the Mercurial-devel mailing list