Commits

Yuya Nishihara committed c58e5b8

sync: replace hg.islocal() on reload by lightweight alternative (fixes #2153)

hg.islocal() calls os.path.isfile() for local path, which may be blocked
by slow/unreachable file-system.

Comments (0)

Files changed (1)

tortoisehg/hgqt/sync.py

         known = set()
         known.add(os.path.abspath(self.repo.root).lower())
         for path in self.paths.values():
-            if hg.islocal(path):
+            if not util.hasscheme(path):
                 known.add(os.path.abspath(util.localpath(path)).lower())
             else:
                 known.add(path)
             else:
                 continue
             for alias, path in ui.configitems('paths'):
-                if hg.islocal(path):
+                if not util.hasscheme(path):
                     abs = os.path.abspath(util.localpath(path)).lower()
                 else:
                     abs = path