changeset 42527:4a6826868625

tests: demonstrate broken in-memory rebase of copy to empty file Differential Revision: https://phab.mercurial-scm.org/D6569
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 24 Jun 2019 16:07:59 -0700
parents 0c0e54bcea9b
children e079e001d536
files tests/test-rebase-inmemory.t
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-inmemory.t	Tue Jun 25 14:23:02 2019 -0700
+++ b/tests/test-rebase-inmemory.t	Mon Jun 24 16:07:59 2019 -0700
@@ -784,6 +784,28 @@
   R a
   $ cd ..
 
+Test rebasing a commit with copy information, where the target is empty
+
+  $ hg init rebase-rename-empty
+  $ cd rebase-rename-empty
+  $ echo a > a
+  $ hg ci -Aqm 'add a'
+  $ cat > a
+  $ hg ci -m 'make a empty'
+  $ hg co -q 0
+  $ hg mv a b
+  $ hg ci -qm 'rename a to b'
+BROKEN: shouldn't crash
+  $ hg rebase -d 1
+  rebasing 2:b977edf6f839 "rename a to b" (tip)
+  merging a and b to b
+  abort: b@c71e275f666f: not found in manifest!
+  [255]
+  $ hg st --copies --change .
+  A b
+    a
+  R a
+  $ cd ..
 Rebase across a copy with --collapse
 
   $ hg init rebase-rename-collapse