Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

dirstate.cpp: use hgroot to identify cached dirstate

No need to add "/.hg/dirstate" on all strings. Compares faster without
and wastes less memory.

Changeset a61dedfe9c84

Parent 4d0fc3b956bb

by Adrian Buehlmann

Changes to one file · Browse files at a61dedfe9c84 Showing diff from parent 4d0fc3b956bb Diff from another changeset...

 
107
108
109
110
 
111
112
113
 
179
180
181
182
 
183
184
185
186
187
188
189
 
190
191
192
 
107
108
109
 
110
111
112
113
 
179
180
181
 
182
183
184
185
186
187
188
 
189
190
191
192
@@ -107,7 +107,7 @@
  {   const dirstate* dstate;   __time64_t mtime; - std::string path; + std::string hgroot;     entry(): dstate(0), mtime(0) {}   }; @@ -179,14 +179,14 @@
    for (;iter != _cache.end(); ++iter)   { - if (path == iter->path) + if (hgroot == iter->hgroot)   break;   }     if (iter == _cache.end())   {   entry e; - e.path = path; + e.hgroot = hgroot;   iter = _cache.insert(iter, e);   }