[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: post-update hook not executed after checkout?

From: Schnyder Franz <schnyderfranz_at_gmail.com>
Date: Tue, 16 Sep 2014 23:29:21 -0700 (PDT)

Hi

Just around the time you posted this we encountered the same problem because we started using the post update hook. So we waited eager for an answer. Since nothing happened I had a look into the code yesterday. I think I found the problem and have a patch which fixes it but I'm not sure that it does not introduce any side effects since a just had a quick look and do not have an overview of the hole code base and functionality.

I think the problem is that the the ProjectProperties are read/parsed at the start-up:

UINT CSVNProgressDlg::ProgressThread()
{
 ...
    if (!m_ProjectProperties.PropsRead())
    {
        m_ProjectProperties.ReadPropsPathList(m_targetPathList);
    }
...
}

But since we have nothing local yet when doing a checkout the ProjectProperties are empty. Then after the checkout the hooks are executed but since the ProjectProperties are empty no hook is executed.
So in my patch blow I redo the ProjectProperties reading/parsing after the checkout but before the hooks are executed and now the ProjectProperties contain the post-update hook and it is executed.
  
It would be nice if a commiter could have a look at the patch below to judge and maybe include it into the code base or should a create a bug and attach the patch to the bug?

Thanks and regards
Franz

Patch:

Index: src/TortoiseProc/SVNProgressDlg.cpp
===================================================================
--- src/TortoiseProc/SVNProgressDlg.cpp (revision 25854)
+++ src/TortoiseProc/SVNProgressDlg.cpp (working copy)
@@ -2548,6 +2548,7 @@
 
     DWORD exitcode = 0;
     CString error;
+ m_ProjectProperties.ReadPropsPathList(m_targetPathList);
     CHooks::Instance().SetProjectProperties(m_targetPathList.GetCommonRoot(), m_ProjectProperties);
     CTSVNPathList updatedList = GetPathsForUpdateHook(m_targetPathList);
     if ((!m_bNoHooks)&&(CHooks::Instance().PostUpdate(m_hWnd, m_targetPathList, m_depth, m_RevisionEnd, updatedList, exitcode, error)))

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3088610

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2014-09-17 09:26:21 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.