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 " " > foo + $ hg ci -Aqm 'added foo' + + $ rm foo + $ touch foo + $ hg di + diff --git a/foo b/foo + --- a/foo + +++ b/foo + @@ -1,1 +0,0 @@ + - + + $ hg ci -m "remove the whitespace" + + $ hg up '.^' + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ printf "\n" > foo + $ hg di + diff --git a/foo b/foo + --- a/foo + +++ b/foo + @@ -1,1 +1,1 @@ + - + + + $ hg ci -m "remove the whitespace again" + created new head + + $ hg rebase -r . -d 1 --config ui.merge=internal:merge3 + rebasing 2:376089bb8d86 "remove the whitespace again" (tip) + merging foo + abort: foo.orig@bb96b8f33f2a: not found in manifest! + [255]