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

Re: [TSVN] Comment on 1895

From: Will Dean <svn_at_indcomp.co.uk>
Date: 2004-11-02 21:47:57 CET

At 21:21 02/11/2004 +0100, you wrote:

>No. I'm adding the cache timeout (the same as in GetFullStatus()) later.
>But right now I'm busy with other things.

Appended is a patch to do this.

BTW, I don't know if this is my broken copy, the intention, or what, but
when I right-click a modified file and choose create patch, I get a patch
which includes *every* modified file in the current folder.

I'd also like to be able to choose to have a patch put on the clipboard,
but I should probably implement that myself if I want it...

Cheers,

Will

Index: SVNFolderStatus.cpp
===================================================================
--- SVNFolderStatus.cpp (revision 1896)
+++ SVNFolderStatus.cpp (working copy)
@@ -99,7 +99,7 @@
         svn_client_ctx_t * ctx;
         apr_hash_t * statushash;
         apr_pool_t * pool;
- svn_error_t * err;
+ svn_error_t * err = NULL; // If
svn_client_status comes out through catch(...), err is unassigned
         const char * internalpath;

         //dont' build the cache if an instance of TortoiseProc is running
@@ -250,17 +250,8 @@

         if (! g_ShellCache.HasSVNAdminDir(filepath, bIsFolder))
                 return &invalidstatus;
- filestatuscache * ret = NULL;
- sCacheKey.assign(filepath);
- std::map<stdstring, filestatuscache>::iterator iter;
- if ((iter = m_cache.find(sCacheKey)) != m_cache.end())
- {
- ATLTRACE2(_T("cache found for %s\n"), filepath);
- ret = (filestatuscache *)&iter->second;
- DWORD now = GetTickCount();
- if ((now >= m_TimeStamp)&&((now - m_TimeStamp) >
GetTimeoutValue()))
- ret = NULL;
- }
+
+ filestatuscache * ret = GetCachedItem(filepath);
         if (ret)
                 return ret;

@@ -274,7 +265,14 @@
         std::map<stdstring, filestatuscache>::iterator iter;
         if ((iter = m_cache.find(sCacheKey)) != m_cache.end())
         {
- return (filestatuscache *)&iter->second;
+ //ATLTRACE2(_T("cache found for %s\n"), filepath);
+ DWORD now = GetTickCount();
+ if ((now >= m_TimeStamp)&&((now - m_TimeStamp) >
GetTimeoutValue()))
+ {
+ // Cache is timeed-out
+ return NULL;
+ }
+ return &iter->second;
         }
         return NULL;
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Nov 2 21:48:47 2004

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.