From e4ad5a953ec0127d65f16619e8b84e476bb6b362 Mon Sep 17 00:00:00 2001 From: ormung <30354722+ormung@users.noreply.github.com> Date: Mon, 18 Sep 2017 23:16:30 +0200 Subject: Faster mercurial vcs Use "chg", a faster client to mercurial shipped with mercurial itself. This fixes the unrecoverable hang I get when entering a folder with many hg repos. --- ranger/ext/vcs/vcs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ranger/ext/vcs/vcs.py b/ranger/ext/vcs/vcs.py index ba28d141..ea38eb8b 100644 --- a/ranger/ext/vcs/vcs.py +++ b/ranger/ext/vcs/vcs.py @@ -112,7 +112,11 @@ class Vcs(object): # pylint: disable=too-many-instance-attributes def _run(self, args, path=None, # pylint: disable=too-many-arguments catchout=True, retbytes=False, rstrip_newline=True): """Run a command""" - cmd = [self.repotype] + args + if self.repotype == 'hg': + # use "chg", a faster built-in client + cmd = ['chg'] + args + else: + cmd = [self.repotype] + args if path is None: path = self.path -- cgit 1.4.1-2-gfad0