Patchwork D6307: tests: show IMM is broken when merging file empty in destination

login
register
mail settings
Submitter phabricator
Date April 24, 2019, 7:04 p.m.
Message ID <8fc4371b1fed7878598daaa7b6b43f15@localhost.localdomain>
Download mbox | patch
Permalink /patch/39822/
State Not Applicable
Headers show

Comments

phabricator - April 24, 2019, 7:04 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7a1ae0632829: tests: show IMM is broken when merging file empty in destination (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6307?vs=14912&id=14915

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

AFFECTED FILES
  tests/test-rebase-inmemory.t

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: martinvonz, 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
@@ -760,3 +760,42 @@ 
   rebasing 3:ca58782ad1e4 "b"
   rebasing 5:71cb43376053 "merge"
   note: not rebasing 5:71cb43376053 "merge", its destination already has all its changes
+
+  $ cd ..
+
+Test rebasing when the file we are merging in destination is empty
+
+  $ hg init test
+  $ cd test
+  $ echo a > foo
+  $ hg ci -Aqm 'added a to foo'
+
+  $ rm foo
+  $ touch foo
+  $ hg di
+  diff --git a/foo b/foo
+  --- a/foo
+  +++ b/foo
+  @@ -1,1 +0,0 @@
+  -a
+
+  $ hg ci -m "make foo an empty file"
+
+  $ hg up '.^'
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo b > foo
+  $ hg di
+  diff --git a/foo b/foo
+  --- a/foo
+  +++ b/foo
+  @@ -1,1 +1,1 @@
+  -a
+  +b
+  $ hg ci -m "add b to foo"
+  created new head
+
+  $ hg rebase -r . -d 1 --config ui.merge=internal:merge3
+  rebasing 2:fb62b706688e "add b to foo" (tip)
+  merging foo
+  abort: foo.orig@e780cf6f9041: not found in manifest!
+  [255]