Hi,

I've been observing that Project monitor display a "failed" overlay in the 
tree after intermittent failures, even when the failure has disappeared. 
This has also been discussed in the groups previously, for example [1]. 
I've been trying to reproduce this and I believe I've found the root cause.

High level description:
- Setup monitoring a project.
- On checking the projects (timer or Check now), there is an error. For 
example due to missing network connectivity. The project is now marked as 
failed and error is stored in MonitoringData.ini.
- Later network connectivity is restored. The check will succeed, however 
this is not stored in MonitoringData.ini. Thus, the project still has the 
"failed" overlay and you have to manually clear errors and check again.

An easy way to reproduce this is to enter a fake entry in the 
%systemroot%\System32\drivers\etc\hosts overriding DNS lookup for the 
Subversion server and then remove the same entry again for the second 
update.

I would prefer that intermittent failures clear themselves.

As far as I understand, monitoring is performed by a separate thread. This 
is using a separate vector of items to check. After check is completed, the 
data is copied back to the main list in OnMonitorThreadFinished().

The current implementation is to only update the main list if the lastHead 
has changed or if the item *currently* has an error message. Ie: If there 
previously was an error message but it has now disappeared, the update will 
not happen (unless there was a new revision). I would propose to change 
this to lastHead has changed or the error message has changed, as follows:

[[[
--- C:/Users/danie/AppData/Local/Temp/LogDlg.cpp-revBASE.svn001.tmp.cpp   
 lör dec  3 17:51:45 2022
+++ C:/Devel/tortoisesvn_trunk/src/TortoiseProc/LogDialog/LogDlg.cpp    lör 
dec  3 20:09:59 2022
@@ -9436 +9440 @@ void CLogDlg::OnMonitorThreadFinished()
-                if ((pItem->lastHead != item.lastHead) || 
(!item.lastErrorMsg.IsEmpty()))
+                if ((pItem->lastHead != item.lastHead) || 
(pItem->lastErrorMsg.IsEmpty() != item.lastErrorMsg.IsEmpty()))
]]]

I believe the same root cause is also relevant in another thread [2] 
claiming that url changes doens't always work - but MonitoringData snippet 
it seems the error message is not related to the current URL.

Kind regards,
Daniel

[1] https://groups.google.com/g/tortoisesvn/c/fvLiiJl4-iI/m/9ZCXFwutAQAJ
[2] https://groups.google.com/g/tortoisesvn/c/5juHVu4tioQ/m/3YUVFfJ9AgAJ

-- 
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/1e428447-901d-4d48-9d5e-916a7b05f830n%40googlegroups.com.

Reply via email to