Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

fogcreek overlay: use Winstat64 to detect when kbfiles is enabled

Changeset 3169b586a4d9

Parent fc6c6713b0f6

by David Golub

Changes to one file · Browse files at 3169b586a4d9 Showing diff from parent fc6c6713b0f6 Diff from another changeset...

 
22
23
24
 
25
26
27
 
84
85
86
87
88
 
89
90
 
91
92
93
 
 
 
 
 
 
 
 
 
 
 
 
 
94
95
96
 
22
23
24
25
26
27
28
 
85
86
87
 
 
88
89
 
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
@@ -22,6 +22,7 @@
 #include "DirectoryStatus.h"  #include "Dirstatecache.h"  #include "Winstat.h" +#include "Winstat64.h"  #include "TortoiseUtils.h"  #include "Thgstatus.h"   @@ -84,13 +85,25 @@
  std::string p = cur.path;   p.push_back('\\');   bool unset = false; - if (p.find("\\.hg\\") != std::string::npos || (p.find("\\.kbf\\") != std::string::npos && - Dirstatecache::get(cur.hgroot, cur.path, unset, true) != 0)) + if (p.find("\\.hg\\") != std::string::npos)   { - // ignore files and dirs named '.hg' or '.kbf' (if kbfiles is enabled) + // ignore files and dirs named '.hg'   last = cur;   return 0;   } + int pos; + if ((pos = p.find("\\.kbf\\")) != std::string::npos) + { + p.resize(pos); + p += "\\.hg\\kilnbfiles"; + Winstat64 stat; + if (stat.lstat(p.c_str()) == 0) + { + // ignore files and dirs named '.kbf' when kbfiles is enabled + last = cur; + return 0; + } + }   }     if (!outdated && !last.hgroot.empty()