[Bug 5958] New: A case that "shouldn't happen" can happen relatively easily

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Mon Aug 13 20:00:58 UTC 2018


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

            Bug ID: 5958
           Summary: A case that "shouldn't happen" can happen relatively
                    easily
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: evolution
          Assignee: bugzilla at mercurial-scm.org
          Reporter: hg at pewpew.net
                CC: mercurial-devel at mercurial-scm.org,
                    pierre-yves.david at ens-lyon.org

The hint isn't super useful to me (I don't know what it's saying I should do),
and one of my users managed to hit this case.


Here's the .t test that shows how to reproduce:

Show that a case that "shouldn't happen" can happen without too much
difficulty.

  $ hg init shouldnt_happen
  $ cd shouldnt_happen
(Let's make the glog output nicer)
  $ echo hi > r0
  $ hg ci -qAm 'add r0'
  $ echo hi > foo.txt
  $ hg ci -qAm 'add foo.txt'
  $ hg touch -q
(Make changes in unrelated files so that we don't have any merge conflicts
during the rebase, but the two touched revisions aren't identical)
  $ echo hi > bar.txt
  $ hg add -q bar.txt
  $ hg amend -q
  $ hg touch -q --allowdivergence -r 1 --hidden
  2 new content-divergent changesets
  $ echo hi > baz.txt
  $ hg add -q baz.txt
  $ hg amend -q
  $ hg rebase -qr tip -d 4 --hidden
  $ hg glog
  @  6:6c25f9b11514 add foo.txt
  |   () [default] draft
  *  4:b46bf84699a8 add foo.txt
  |   () [default] draft
  o  0:a24ed8ad918c add r0
      () [default] draft
  $ hg obslog -a -r .
  @  6c25f9b11514 (6) add foo.txt
  |
  | *  b46bf84699a8 (4) add foo.txt
  | |
  x |  33e073a9d78a (5) add foo.txt
  | |    rewritten(meta, parent, content) as 6c25f9b11514 using rebase by test
(Thu Jan 01 00:00:00 1970 +0000)
  | |
  x |  07137fa7fd35 (3) add foo.txt
  | |    rewritten(content) as 33e073a9d78a using amend by test (Thu Jan 01
00:00:00 1970 +0000)
  | |
  x |  79741c4b51f3 (2) add foo.txt
  |/     rewritten(content) as 07137fa7fd35 using amend by test (Thu Jan 01
00:00:00 1970 +0000)
  |
  x  cc71ffbc7c00 (1) add foo.txt
       rewritten(meta) as 79741c4b51f3 using touch by test (Thu Jan 01 00:00:00
1970 +0000)
       rewritten(meta) as b46bf84699a8 using touch by test (Thu Jan 01 00:00:00
1970 +0000)

  $ hg evolve --content-divergent
  merge:[6] add foo.txt
  with: [4] add foo.txt
  base: [1] add foo.txt
  rebasing "other" content-divergent changeset b46bf84699a8 on b46bf84699a8
  abort: tried to relocate a node on top of itself
  (This shouldn't happen. If you still need to move changesets, please do so
manually with nothing to rebase - working directory parent is also destination)
  [255]

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


More information about the Mercurial-devel mailing list