mirror of
https://github.com/facebook/sapling.git
synced 2024-10-13 02:07:31 +03:00
cloud sync: speed up it after hg hide and other repo modifications related to about obsmarkers only
Summary: about 3-6 seconds speed up for cloud sync after hg hide (no ssh any more) also to sync hg hide on another machine Reviewed By: quark-zju Differential Revision: D9403921 fbshipit-source-id: 56c1475dc104f6b13483db4bdb40dabd09a6400d
This commit is contained in:
parent
7d9365a359
commit
00e4efbf47
@ -480,9 +480,14 @@ def _docloudsync(ui, repo, checkbackedup=False, cloudrefs=None, **opts):
|
||||
if checkbackedup or len(newheads) > nocheckbackepdulimit:
|
||||
newheads = serv.filterpushedheads(reponame, newheads)
|
||||
|
||||
newheads, failedheads = infinitepush.pushbackupbundlestacks(
|
||||
ui, repo, getconnection, newheads
|
||||
)
|
||||
# all pushed to the server except maybe obsmarkers
|
||||
allspushed = (not newheads) and (localbookmarks == lastsyncstate.bookmarks)
|
||||
|
||||
failedheads = []
|
||||
if not allspushed:
|
||||
newheads, failedheads = infinitepush.pushbackupbundlestacks(
|
||||
ui, repo, getconnection, newheads
|
||||
)
|
||||
|
||||
if failedheads:
|
||||
pushfailures |= set(failedheads)
|
||||
@ -515,9 +520,10 @@ def _docloudsync(ui, repo, checkbackedup=False, cloudrefs=None, **opts):
|
||||
# Update the infinitepush backup bookmarks to point to the new
|
||||
# local heads and bookmarks. This must be done after all
|
||||
# referenced commits have been pushed to the server.
|
||||
pushbackupbookmarks(
|
||||
ui, repo, getconnection, localheads, localbookmarks, **opts
|
||||
)
|
||||
if not allspushed:
|
||||
pushbackupbookmarks(
|
||||
ui, repo, getconnection, localheads, localbookmarks, **opts
|
||||
)
|
||||
|
||||
# Update the cloud heads, bookmarks and obsmarkers.
|
||||
synced, cloudrefs = serv.updatereferences(
|
||||
|
Loading…
Reference in New Issue
Block a user