tests/test-revlog-ancestry.py.out
author Pulkit Goyal <pulkit@yandex-team.ru>
Wed, 24 Apr 2019 19:42:43 +0300
branchstable
changeset 42193 14589f1989e9
parent 39474 a60dae060bc8
permissions -rw-r--r--
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

Ancestors of 5
4 2 0 
Ancestors of 6 and 5
4 3 2 1 0 
Ancestors of 5 and 4
4 2 0 
Ancestors of 7, stop at 6
6 
Ancestors of 7, including revs
7 6 5 4 3 2 1 0 
Ancestors of 7, 5 and 3, including revs
7 6 5 4 3 2 1 0 

Descendants of 5
7 8 
Descendants of 5 and 3
6 7 8 
Descendants of 5 and 4
5 7 8