https://pantsbuild.org/ logo
#development
Title
# development
w

witty-crayon-22786

03/18/2016, 6:42 PM
Copy code
$ git diff
diff --git a/src/python/pants/engine/exp/legacy/commands.py b/src/python/pants/engine/exp/legacy/commands.py
index d8b3d04..7b6bb27 100644
--- a/src/python/pants/engine/exp/legacy/commands.py
+++ b/src/python/pants/engine/exp/legacy/commands.py
@@ -44,7 +44,7 @@ def setup():
   cmd_line_spec_parser = CmdLineSpecParser(build_root)
   spec_roots = [cmd_line_spec_parser.parse_spec(spec) for spec in sys.argv[1:]]

-  storage = Storage.create(debug=False)
+  storage = Storage.create(path='blah', debug=False)
   project_tree = FileSystemProjectTree(build_root)
   symbol_table_cls = LegacyTable

diff --git a/src/python/pants/engine/exp/storage.py b/src/python/pants/engine/exp/storage.py
index 68aaea9..fac251c 100644
--- a/src/python/pants/engine/exp/storage.py
+++ b/src/python/pants/engine/exp/storage.py
@@ -116,17 +116,18 @@ class Storage(Closable):
   LMDB_KEY_MAPPINGS_DB_NAME = b'_key_mappings_'

   @classmethod
-  def create(cls, in_memory=False, debug=True, protocol=None):
+  def create(cls, in_memory=False, debug=True, path=None, protocol=None):
     """Create a content addressable Storage backed by a key value store.

     :param in_memory: Indicate whether to use the in-memory kvs or an embeded database.
+    :param path: If in_memory=False, the path to store the database in.
     :param debug: A flag to store debug information in the key.
     :param protocol: Serialization protocol for pickle, if not provided will use ASCII protocol.
     """
     if in_memory:
       content, key_mappings = InMemoryDb(), InMemoryDb()
     else:
-      content, key_mappings = Lmdb.create(child_databases=[cls.LMDB_KEY_MAPPINGS_DB_NAME])
+      content, key_mappings = Lmdb.create(path=path, child_databases=[cls.LMDB_KEY_MAPPINGS_DB_NAME])

     return Storage(content, key_mappings, debug=debug, protocol=protocol)