From 730327c29eaf1e6a032558f4201114561656c77e Mon Sep 17 00:00:00 2001 From: Xavier Deguillard Date: Mon, 23 Mar 2020 14:30:15 -0700 Subject: [PATCH] eden: commit the Rust ContentStore when unable to find a blob Summary: The markforrefresh only exist in the legacy Python contentstore, commiting the current store will have the same effect for the Rust store. Reviewed By: DurhamG Differential Revision: D20562032 fbshipit-source-id: de12cfd65d992395c9b9894d1f05cf50d86b0191 --- eden/scm/edenscm/mercurial/commands/eden.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eden/scm/edenscm/mercurial/commands/eden.py b/eden/scm/edenscm/mercurial/commands/eden.py index 71a458b9e6..d310177acd 100644 --- a/eden/scm/edenscm/mercurial/commands/eden.py +++ b/eden/scm/edenscm/mercurial/commands/eden.py @@ -716,7 +716,12 @@ class HgServer(object): # does not have a contentstore. So fail immediately raise ResetRepoError(e) - self.repo.fileslog.contentstore.markforrefresh() + if self.repo.fileslog._ruststore: + # Committing the contentstore will force it to be rebuilt, + # effectively refreshing the store. + self.repo.fileslog.contentstore.commitpending() + else: + self.repo.fileslog.contentstore.markforrefresh() try: return attr_of(fctx)