Thanks! The problem I'm trying to solve is that I couldn't get the hooks to execute when I set them to a specific path (c:\devevel\test, which is my wc), only when using *. I stepped through the code in Visual Studio and I noticed that CHooks::FindItem didn't find a hook (it = find(key) always returned end()) for a path even though I had seen it being added from the registry just before.
My understanding is as follows: * A CTSVNPath object contain a number of separate CStrings for storing the path. Depending on how it is set, only some are populated. (The rest are populated if requested). * When the hookkey is created the path is constructed in different ways in different places of the code, for example in Hooks.cpp when reading from the Registry it is created using the constructor (which calls SetFromUnknown, in turn calling SetFwdslashPath) and in ParseAndInsertProjectProperty the wcRootPath has been constructed in a different way. * The pathList in CHooks::FindItem again contain different members of CTSVNPath. * The STL map::find function will only match a key if all members are exactly the same. (The last point is merely an observation of behaviour, I can't give any references to this being expected behaviour). By switching out the CTSVNPath to CString (and being strict about that string always being retrieved from CTSVNPath::GetWinPathString()) I'm able to find my hook scripts. Initially I made a simpler patch in CHooks::FindItem which instead of just taking pathList[i] created a new CTSVNPath object that only had the forwardslashpath set. That worked for hook scripts from the registry however failed for hook scripts as project properties. For this to work all places where the hookkey path is set must create a new CTSVNPath with only the forwardslashpath set. [Of course it could also be using the backslashpath instead]. Sorry for the long explaination but I must admit C++ is not my primary langauge. Kind regards, Daniel Sahlberg söndag 10 januari 2021 kl. 18:20:00 UTC+1 skrev Stefan: > committed two of your patches in r29051, but I don't see the benefit of > your hookkey-as-CString patch. Why do you think using a CString is better > there? > > -- 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 tortoisesvn-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn-dev/90db78be-79cd-430a-8695-a53c5398a10dn%40googlegroups.com.