More regarding the Don't show context menu

13 views
Skip to first unread message

Daniel Sahlberg

unread,
Sep 16, 2024, 4:24:26 PM9/16/24
to TortoiseSVN-dev
Hi,

On investigating the "hang" described in the user's group [1], I checked why TSVN is accessing wc.db even though the working copy path is set as Don't show.

In CShellExt::Initialize, the code is:
For each selected item
  - For item 0: call g_shellCache.IsVersioned
     - Which in turn calls SVNHelper::IsVersioned  <= This is accessing wc.db
  - Resolve shortcuts, unless we previously found a WC ("shortcut inside a working copy should not be resolved so it can be added to version control and handled as versioned later")
  - Check if the path is in the Don't show list (ie, g_shellCache.IsContextPathAllowed)

How about moving the call to IsContextPathAllowed to the top of loop? If a folder is in the don't show list, then we shouldn't show the context menu at all - right?

There should possibly be a separate call to IsContextPathAllowed when a shortcut has been resolved as well to see if the shortcut points to a folder that is in the Don't show list.

WDYT?

Kind regards,
Daniel



Stefan

unread,
Sep 17, 2024, 1:47:03 PM9/17/24
to TortoiseSVN-dev
I think your analysis is correct. The IsContextPathAllowed should be on top of the loop.

Stefan
 

Daniel Sahlberg

unread,
Sep 18, 2024, 2:24:47 AM9/18/24
to TortoiseSVN-dev
Thanks! Committed as r29712.

Cheers,
Daniel
Reply all
Reply to author
Forward
0 new messages