sapling/eden/fs/store/hg/test
Adam Simpkins 094810c520 clean up treemanifest initialization in HgImporter
Summary:
This refactors the treemanifest union store initialization code, and fixes a
crash introduced in D5560787 if --use_hg_tree_manifest is enabled but the
underlying repository does not support treemanifest.

This moves the treemanifest initialization code into a new importTreeManifest()
helper function, and separates it from parsing the CMD_STARTED response.  We
now only initialize unionStore_ if FLAGS_use_hg_tree_manifest is enabled and
the repository supports treemanifest.  Other places in the code now only check
if unionStore_ is non-null to see if they should try importing via
treemanifest.

Splitting importTreeManifest() from the CMD_STARTED response parsing will
potentially make things cleaner in the future for using multiple
hg_import_helper.py processes.  Even if we start multiple of these processes,
we only need one instance of the C++ union store, and we don't need to
re-initialize the treemanifest separately each time.

Reviewed By: bolinfest

Differential Revision: D5647203

fbshipit-source-id: 71e14156f1d0ebc0880dd819c5b041b7c1146818
2017-08-17 16:13:00 -07:00
..
HgImportTest.cpp clean up treemanifest initialization in HgImporter 2017-08-17 16:13:00 -07:00
TARGETS clean up treemanifest initialization in HgImporter 2017-08-17 16:13:00 -07:00