Mercurial > hg-stable
comparison tests/test-rebase-inmemory.t @ 42156:14589f1989e9 stable
context: check file exists before getting data from _wrappedctx
overlayworkingctx class is used to do in-memory merging. The data() function of
that class has logic to look for data() in the wrappedctx if the file data in
cache is empty and if the file is dirty. This assumes that if a file is dirty
and cache has empty data for it, it will exists in the _wrappedctx.
However this assumption can be False in case when we are merging a file which is
empty in destination. In these cases, the backup file 'foo.orig' created by our
internal merge algorithms will be empty, however it won't be present in
_wrappedctx. This case will lead us to error like the one this patch is fixing.
Let's only fallback to getting data from wrappedctx if cache has 'None' as data.
Differential Revision: https://phab.mercurial-scm.org/D6308
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Wed, 24 Apr 2019 19:42:43 +0300 |
parents | 818051048c2e |
children | 5265c7d47213 |
comparison
equal
deleted
inserted
replaced
42155:818051048c2e | 42156:14589f1989e9 |
---|---|
795 created new head | 795 created new head |
796 | 796 |
797 $ hg rebase -r . -d 1 --config ui.merge=internal:merge3 | 797 $ hg rebase -r . -d 1 --config ui.merge=internal:merge3 |
798 rebasing 2:fb62b706688e "add b to foo" (tip) | 798 rebasing 2:fb62b706688e "add b to foo" (tip) |
799 merging foo | 799 merging foo |
800 abort: foo.orig@e780cf6f9041: not found in manifest! | 800 hit merge conflicts; re-running rebase without in-memory merge |
801 [255] | 801 rebasing 2:fb62b706688e "add b to foo" (tip) |
802 merging foo | |
803 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
804 unresolved conflicts (see hg resolve, then hg rebase --continue) | |
805 [1] |