More regarding the Don't show context menu

Daniel Sahlberg via TortoiseSVN-dev <[email protected]> Mon, 16 Sep 2024 13:24:26 -0700 (PDT)
Newsgroups gmane.comp.version-control.subversion.tortoisesvn.devel
Message-ID <[email protected]>
------=_Part_196156_830205502.1726518266099
Content-Type: multipart/alternative; 
	boundary="----=_Part_196157_1799450302.1726518266099"

------=_Part_196157_1799450302.1726518266099
Content-Type: text/plain; charset="UTF-8"

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


[1] https://groups.google.com/g/tortoisesvn/c/BjYlMU4Bg6A

-- 
You received this message because you are subscribed to the Google Groups "TortoiseSVN-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn-dev/81d4a7b1-537f-484a-95b4-47d5671c6923n%40googlegroups.com.

------=_Part_196157_1799450302.1726518266099
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,<div><br /></div><div>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.</div><div><br /></div><div>In CShellExt::In=
itialize, the code is:</div><div>For each selected item<br /></div><div>=C2=
=A0 - For item 0: call g_shellCache.IsVersioned</div><div>=C2=A0 =C2=A0 =C2=
=A0- Which in turn calls SVNHelper::IsVersioned=C2=A0 &lt;=3D This is acces=
sing wc.db</div><div>=C2=A0 - 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")</div><div>=C2=A0 =
- Check if the path is in the Don't show list (ie, g_shellCache.IsContextPa=
thAllowed)</div><div><br /></div><div>How about moving the call to IsContex=
tPathAllowed to the top of loop? If a folder is in the don't show list, the=
n we shouldn't show the context menu at all - right?</div><div><br /></div>=
<div>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 fol=
der that is in the Don't show list.</div><div><br /></div><div>WDYT?</div><=
div><br /></div><div>Kind regards,</div><div>Daniel</div><div><br /></div><=
div><br /></div><div>[1] https://groups.google.com/g/tortoisesvn/c/BjYlMU4B=
g6A<br /></div><div><br /></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;TortoiseSVN-dev&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">tor=
[email protected]</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/tortoisesvn-dev/81d4a7b1-537f-484a-95b4-47d5671c6923n%40googlegr=
oups.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/=
d/msgid/tortoisesvn-dev/81d4a7b1-537f-484a-95b4-47d5671c6923n%40googlegroup=
s.com</a>.<br />

------=_Part_196157_1799450302.1726518266099--

------=_Part_196156_830205502.1726518266099--