mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
commitcloud: log sync state to blackbox log
Summary: Improve debugability of cloud sync by logging updated sync state to the blackbox logs. Reviewed By: mitrandir77 Differential Revision: D15434890 fbshipit-source-id: c5065455985a48777a855997a99e32ce0b31cc72
This commit is contained in:
parent
30e5b3eb26
commit
1eaa46bd64
@ -38,6 +38,7 @@ class SyncState(object):
|
||||
repo.svfs.tryunlink(filename)
|
||||
|
||||
def __init__(self, repo, workspacename):
|
||||
self.workspacename = workspacename
|
||||
self.filename = self._filename(workspacename)
|
||||
self.repo = repo
|
||||
self.prevstate = None
|
||||
@ -97,6 +98,16 @@ class SyncState(object):
|
||||
self.omittedheads = newomittedheads
|
||||
self.omittedbookmarks = newomittedbookmarks
|
||||
self.maxage = newmaxage
|
||||
self.repo.ui.log(
|
||||
"commitcloud_sync",
|
||||
"synced to workspace %s version %s: %d heads (%d omitted), %d bookmarks (%d omitted)\n",
|
||||
self.workspacename,
|
||||
newversion,
|
||||
len(newheads),
|
||||
len(newomittedheads),
|
||||
len(newbookmarks),
|
||||
len(newomittedbookmarks),
|
||||
)
|
||||
|
||||
def oscillating(self, newheads, newbookmarks):
|
||||
"""detect oscillating workspaces
|
||||
|
Loading…
Reference in New Issue
Block a user