diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1824,7 +1824,7 @@ def data(self, path): if self.isdirty(path): if self._cache[path]['exists']: - if self._cache[path]['data']: + if self._cache[path]['data'] is not None: return self._cache[path]['data'] else: # Must fallback here, too, because we only set flags. 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 @@ -797,5 +797,9 @@ $ 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] + hit merge conflicts; re-running rebase without in-memory merge + rebasing 2:fb62b706688e "add b to foo" (tip) + merging foo + warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') + unresolved conflicts (see hg resolve, then hg rebase --continue) + [1]