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: simplify HgQueryDirstateDirectory

Changeset 8543d9d3483a

Parent 178846747f5d

by Adrian Buehlmann

Changes to one file · Browse files at 8543d9d3483a Showing diff from parent 178846747f5d Diff from another changeset...

 
289
290
291
292
293
 
 
294
295
296
 
305
306
307
308
309
310
311
312
 
313
314
315
 
289
290
291
 
 
292
293
294
295
296
 
305
306
307
 
308
 
 
 
309
310
311
312
@@ -289,8 +289,8 @@
  bool modified = false;   bool empty = true;   - size_t rootlen = hgroot.size(); - size_t len = relpath.size(); + const size_t len = relpath.size(); + const std::string hgroot_slash = hgroot + "/";     for (dirstate::Iter iter = pd->begin();   iter != pd->end() && !modified; ++iter) @@ -305,11 +305,8 @@
  switch (e.state)   {   case 'n': - if (!modified)   { - std::string temp = hgroot; - temp += "/"; - temp += e.name; + std::string temp = hgroot_slash + e.name;   if (0 == lstat(temp.c_str(), stat))   modified = (e.status(stat) == 'M');   }