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: Directory::status: search subdirs first

Changeset bb5c6bd92ce8

Parent 24d1f530806f

by Adrian Buehlmann

Changes to one file · Browse files at bb5c6bd92ce8 Showing diff from parent 24d1f530806f Diff from another changeset...

 
260
261
262
263
 
 
 
 
 
 
 
 
 
 
 
264
265
266
267
268
269
270
271
 
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
 
260
261
262
 
263
264
265
266
267
268
269
270
271
272
273
274
 
 
275
 
276
277
278
 
291
292
293
 
 
 
 
 
 
 
 
 
294
295
296
@@ -260,12 +260,19 @@
   char Directory::status(const std::string& hgroot)  { - char res = 0; + bool added = false; + + for (DirsT::iterator i = subdirs_.begin(); i != subdirs_.end(); ++i) + { + char s = (*i)->status(hgroot); + if (s == 'M') + return 'M'; + if (s == 'A') + added = true; + } +   struct _stat stat; - bool added = false; -   const std::string hrs = hgroot + '\\'; -   for (FilesT::iterator i = files_.begin(); i != files_.end(); ++i)   {   std::string p = hrs + path(i->name); @@ -284,15 +291,6 @@
  added = true;   }   - for (DirsT::iterator i = subdirs_.begin(); i != subdirs_.end(); ++i) - { - char s = (*i)->status(hgroot); - if (s == 'M') - return 'M'; - if (s == 'A') - added = true; - } -   if (added)   return 'A';