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

RE: Re: bug\patch: In UpdateCurrentStatus(): UpdateShell not always called if status changed

From: Gunnar Dalsnes <hardon_at_online.no>
Date: Sun, 30 Aug 2009 14:50:27 -0700 (PDT)

I didn't test further, but I came to conclusion that this is not the right fix, so please ignore the patch.

I discovered the initial status returned for the WC base folder was always status none, and this seems wrong. It should have been status normal. The shell refresh patch i sent is just a workaround for this bug.

In GetStatusForMember:
        if (path.IsDirectory())
        {
                CCachedDirectory * dirEntry = CSVNStatusCache::Instance().GetDirectoryCacheEntry(path);
                if ((dirEntry)&&(dirEntry->IsOwnStatusValid()))
                {
                        //CSVNStatusCache::Instance().AddFolderForCrawling(path);
                        return dirEntry->GetOwnStatus(bRecursive);
                }

                // If the status *still* isn't valid here, it means that
                // the current directory is unversioned, and we shall need to ask its children for info about themselves
                if ((dirEntry)&&(!dirEntry->m_directoryPath.IsEquivalentToWithoutCase(path)))
                        return dirEntry->GetStatusForMember(path,bRecursive);

These two lines make no sense to me:
//here we get the dirEntry for path
CCachedDirectory * dirEntry = CSVNStatusCache::Instance().GetDirectoryCacheEntry(path);
//here we check that the dirEntry path is not equal to path?!? It should be impossible that they are not equal.
!dirEntry->m_directoryPath.IsEquivalentToWithoutCase(path)

I think the line
if ((dirEntry)&&(!dirEntry->m_directoryPath.IsEquivalentToWithoutCase(path)))
should have read
if ((dirEntry)&&(!bRequestForSelf))
or alternatively\equivalent
if ((dirEntry)&&(dirEntry != this))

This make the purpose of the line as follows:
// If the status *still* isn't valid here, it means that
// the current directory is unversioned, and we shall need to ask its children for info about themselves,
// _but only if path is a child and not self_

With this change, WC base folders get an initial status normal and status is correctly refreshed when crawler have discovered the real recursive status.

Does this make sense?

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

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-08-31 04:19:12 CEST

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

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