remotefilelog: skip uploadblobs for public revs

Summary:
There is no need to upload content referred by a public commit.

This affects cases like `debugstrip` (ex. for testing `pull` performance with a
lagged commit graph). Without this change, the uploadrevs code path scans
stripped public commits without efficient tree prefetching, which results in
1-by-1 tree fetches and is unusably slow.

Reviewed By: xavierd

Differential Revision: D21630096

fbshipit-source-id: 385edf76cb4eb913b2d64422910cdb46b603e6c0
This commit is contained in:
Jun Wu 2020-05-19 10:23:25 -07:00 committed by Facebook GitHub Bot
parent 513a4f8426
commit e685e64758

View File

@ -413,11 +413,10 @@ def reposetup(ui, repo):
remotefilelogserver.onetimesetup(ui)
def uploadblobs(repo, revs):
def uploadblobs(repo, nodes):
if repo.fileslog._ruststore:
toupload = []
for r in revs:
ctx = repo[r]
for ctx in repo.set("%ln - public()", nodes):
for f in ctx.files():
if f not in ctx:
continue