Issue #537 resolved

Synchronize tab timeout

Anonymous created an issue

I'm running tortoise hg v2.03 on windows XP 32bit. I open the hg workbench and try to go to the synchronize tab: it takes several minutes before open it. The problem, IMHO, is that I have about 10 related paths and some of them is a remote path (\192.168.2.33..). It seems that tortoise tries to reach every path before opening the synchronize tab and if one of them is unreachable (a frequent condition, for me) I have to wait some timeout, maybe related with windows. During this timeout, if I disconnect my LAN cable immediatly the synchronize tab is shown without any timeout. Thanks

Comments (9)

  1. Steve Borho

    Indeed, it is trying to read the .hg/hgrc file inside each related repository in order to learn of other related repositories.

    Hmm, maybe we should treat UNC paths as remote and not scan them; or move the scan to a thread.

  2. Adrian Buehlmann

    Perhaps something like

    diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
    --- a/tortoisehg/hgqt/sync.py
    +++ b/tortoisehg/hgqt/sync.py
    @@ -388,6 +388,9 @@
                     repo = thgrepo._repocache[root]
                     ui = repo.ui
                 else:
    +                continue # quick temporary fix for issue #537. Reading this repo
    +                         # may take a long time, so we skip it if it isn't already
    +                         # open
                     # directly read the repository's configuration file
                     tempui = self.repo.ui.copy()
                     tempui.readconfig(os.path.join(root, '.hg', 'hgrc'))
    

    is warranted for the 2.1 release (due on July 1st).

    IMHO, we can't really know how long it takes to open a repo. And if it's not already open it should perhaps not be opened just to scan for related paths.

    Perhaps this should only be done if the user explicitly requests a scan for related paths. But then, it requires a new UI method (menu entry or button) and maybe some chaching of the results. Neither of which is done easily or quickly.

  3. Steve Borho

    my thought was to use tortoisehg.paths.netdrive_status() to determine if the repo root was readable, but the logic in netdrive_status() doesn't look right now that I look at it.

    The long term the plan is to make the "related paths" list a tree where the user has to manually expand rows to force it to read an .hgrc file.

  4. Log in to comment