From 9262397c0b35d66a1da28d3d7cd0861f782a2c2b Mon Sep 17 00:00:00 2001 From: Phil Cohen Date: Fri, 30 Mar 2018 15:08:06 -0700 Subject: [PATCH] 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 --- hgext/fsmonitor/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py index f80bac6ead..3693806ea1 100644 --- a/hgext/fsmonitor/__init__.py +++ b/hgext/fsmonitor/__init__.py @@ -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()