Skip to content

Commit 3a46c8a

Browse files
MichaelCuevasfacebook-github-bot
authored andcommitted
enable edenapi push for integration tests
Summary: # Context The new AugmentedManifest format used by Sapling and Mononoke will support looking up Trees/Blobs from CAS via (Blake3,size) pairs. We already provide a way for users to get (Blake3,size) pairs for blobs, but there is currently no easy way to get this information for trees. We want to add support to getAttributesFromFilesV2 for looking up the (Blake3,size) pairs for trees as well. To do this, we'll need to add a method for querying TreeMetadata (including size and Blake3 hashes) via the SaplingBackingStore. This initial implementation of TreeMetadata will only include the following features: 1) Ability to query TreeMetadata from the SaplingBackingStore via a getTreeMetadata endpoint 2) The ability to request TreeMetadata from the getAttributesFromFilesV2 thrift endpoint In the future, we will extend the implementation to support: 1) Automatically fetching TreeMetadata during BackingStore::getTree requests 2) Caching TreeMetadata in Eden's in-memory caches # This diff enables edenapi push for integration tests so that the readdir integration tests can push to an eagerepo and request TreeAuxData from the server afterwards Reviewed By: quark-zju Differential Revision: D59662772 fbshipit-source-id: 4cb6620abaf416693b6688b3314490ba35bc07aa
1 parent be3e8b5 commit 3a46c8a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

eden/integration/lib/hgrepo.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ def init(
307307
hgrc.setdefault("checkout", {})
308308
hgrc["checkout"]["use-rust"] = "true"
309309

310+
# It's safe to use EdenAPI push for testing purposes
311+
hgrc.add_section("push")
312+
hgrc["push"]["edenapi"] = "true"
313+
310314
self.write_hgrc(hgrc)
311315

312316
storerequirespath = os.path.join(self.path, ".hg", "store", "requires")
@@ -478,4 +482,5 @@ def push(self, rev: str, target: str, create: bool = False) -> str:
478482
args = ["push", "-r", rev, "--to", target]
479483
if create:
480484
args.append("--create")
485+
481486
return self.hg(*args)

0 commit comments

Comments
 (0)