Patchwork D6569: tests: demonstrate broken in-memory rebase of copy to empty file

login
register
mail settings
Submitter phabricator
Date June 27, 2019, 4:20 p.m.
Message ID <10554169ce7679e5caeffcce9f7548db@localhost.localdomain>
Download mbox | patch
Permalink /patch/40694/
State Not Applicable
Headers show

Comments

phabricator - June 27, 2019, 4:20 p.m.
Closed by commit rHG4a6826868625: tests: demonstrate broken in-memory rebase of copy to empty file (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6569?vs=15652&id=15679

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6569/new/

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

AFFECTED FILES
  tests/test-rebase-inmemory.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
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
@@ -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