mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
add progress.spinner around fsmonitor walk
Summary: When the fsmonitor state gets invalidated and a full repo walk happens (e.g. after `rebase --abort`), it's a very frustrating experience because Mercurial appears to hang without any output until the walk is done (1-2min for my www clone). As we did for "querying watchman", let's add a spinner here so people know what's going on, other than "Mercurial is slow". It also will make it easier to claim impact to whoever helps fix our fsmonitor invalidation story[1], since they can tell users "I fixed the 'full repo walk' issue". Reviewed By: DurhamG, quark-zju Differential Revision: D7448662 fbshipit-source-id: 011eb742bf388328b3cceb2762681b4f2e9a4eb1
This commit is contained in:
parent
5adb6167db
commit
9262397c0b
@ -127,6 +127,7 @@ from mercurial import (
|
||||
localrepo,
|
||||
merge,
|
||||
pathutil,
|
||||
progress,
|
||||
pycompat,
|
||||
registrar,
|
||||
scmutil,
|
||||
@ -647,7 +648,8 @@ def makedirstate(repo, dirstate):
|
||||
orig = super(fsmonitordirstate, self).walk
|
||||
if self._fsmonitordisable:
|
||||
return orig(*args, **kwargs)
|
||||
return overridewalk(orig, self, *args, **kwargs)
|
||||
with progress.spinner(self._ui, 'scanning working copy'):
|
||||
return overridewalk(orig, self, *args, **kwargs)
|
||||
|
||||
def rebuild(self, *args, **kwargs):
|
||||
self._fsmonitorstate.invalidate()
|
||||
|
Loading…
Reference in New Issue
Block a user