mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
[ctree] fix root resolution
Summary: D3842603 broke reads from datapacks because `.initialize()` creates a blank manifest and attaches it to the manifest entry. When we subsequently try to read the root, we don't properly actually resolve it to the manifest in the datapack. Instead, we use that blank manifest which is wrong. Test Plan: `PYTHONPATH=~/work/mercurial/facebook-hg-rpms/fb-hgext/:~/work/mercurial/facebook-hg-rpms/remotenames/:~/work/mercurial/facebook-hg-rpms/lz4revlog/ /opt/local/bin/python2.7 ~/work/mercurial/facebook-hg-rpms/hg-crew/hg --config extensions.perftest=~/work/mercurial/facebook-hg-rpms/fb-hgext/tests/perftest.py --config remotefilelog.fastdatapack=False testtree --kind flat,ctree,fast --test fulliter --build "master~50000::master" --revs 'master + master~5000' Reviewers: #fastmanifest, durham Reviewed By: durham Subscribers: durham, mitrandir, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D3862319 Signature: t1:3862319:1474225268:f01ef876d569bc09c1e0ace71492bbaae017404e
This commit is contained in:
parent
21b475a2f0
commit
70ecb670d8
@ -113,6 +113,12 @@ struct treemanifest {
|
||||
|
||||
hexfrombin(rootNode.c_str(), hexnode);
|
||||
root.initialize(NULL, 0, hexnode.c_str(), MANIFEST_DIRECTORY_FLAG);
|
||||
|
||||
// ManifestEntry.initialize will create a blank manifest in .resolved.
|
||||
// however, we actually want the resolution to happen through
|
||||
// manifestfetcher. therefore, let's delete the field and clear it.
|
||||
delete root.resolved;
|
||||
root.resolved = NULL;
|
||||
}
|
||||
|
||||
treemanifest(ManifestFetcher fetcher, ManifestEntry *otherRoot) :
|
||||
|
Loading…
Reference in New Issue
Block a user