Patchwork D6357: tests: demonstrate another failure with in-memory rebase and copies

login
register
mail settings
Submitter phabricator
Date May 10, 2019, 9:03 p.m.
Message ID <differential-rev-PHID-DREV-tks3mqcudxyu77mbc4du-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39997/
State Superseded
Headers show

Comments

phabricator - May 10, 2019, 9:03 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is a similar to https://phab.mercurial-scm.org/rHGdd1ab72be9832584993955dfeb98d46c79602935 (test: demonstrate crash with
  in-memory rebase and copies, 2019-03-14). The new failure started with
  https://phab.mercurial-scm.org/rHG57203e0210f832b34438534770a583de35d0d6c6 (copies: calculate mergecopies() based on pathcopies(),
  2019-04-11). It happens in the call to mergemod.update() on
  rebase.py:1268 where we call mergemod.update() to graft a node. Since
  the mergecopies() rewrite, that calls _related() with the filectx from
  the overlaywctx instead of a filectx from the changectx where the file
  was last modified. Either should be fine, so I don't think that's
  a bug.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6357

AFFECTED FILES
  tests/test-rebase-inmemory.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-rebase-inmemory.t b/tests/test-rebase-inmemory.t
--- a/tests/test-rebase-inmemory.t
+++ b/tests/test-rebase-inmemory.t
@@ -763,6 +763,21 @@ 
 
   $ cd ..
 
+Test rebasing a commit with copy information
+
+  $ hg init rebase-rename
+  $ cd rebase-rename
+  $ echo a > a
+  $ hg ci -Aqm 'add a'
+  $ echo a2 > a
+  $ hg ci -m 'modify a'
+  $ hg co -q 0
+  $ hg mv a b
+  $ hg ci -qm 'rename a to b'
+  $ hg rebase -d 1 2>&1 | grep '** ProgrammingError'
+  ** ProgrammingError: copydata() called on clean context
+  $ cd ..
+
 Test rebasing when the file we are merging in destination is empty
 
   $ hg init test