Send deltas to server

Summary: Send deltas to server, remove duplicates

Differential Revision: D7659646

fbshipit-source-id: a83ebb3c944636d118556c07e1a9412dae440449
This commit is contained in:
Dong Li 2018-04-18 16:57:30 -07:00 committed by Facebook Github Bot
parent 97e9e5fa6a
commit ab558a19d5

View File

@ -200,6 +200,13 @@ class HttpsCommitCloudService(baseservice.BaseService):
newbookmarks, newobsmarkers):
highlightdebug(self.ui, "sending 'update_references' request\n")
# remove duplicates, must preserve order in the newheads list
newheadsset = set(newheads)
commonset = set([item for item in oldheads if item in newheadsset])
newheads = filter(lambda h: h not in commonset, newheads)
oldheads = filter(lambda h: h not in commonset, oldheads)
# send request
path = '/commit_cloud/update_references?' + self.auth_params