diff options
author | ormung <30354722+ormung@users.noreply.github.com> | 2017-09-18 23:16:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-18 23:16:30 +0200 |
commit | e4ad5a953ec0127d65f16619e8b84e476bb6b362 (patch) | |
tree | 3fb7e73091a34a74b1483848bf9ecf08645427ac /ranger | |
parent | 5bd92b3413c11af4f296ced630dd71c96d3b56b7 (diff) | |
download | ranger-e4ad5a953ec0127d65f16619e8b84e476bb6b362.tar.gz |
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.
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/ext/vcs/vcs.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |