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: don't stat dirs, don't look into root paths

Changeset 7658c2335d00

Parent bb5c6bd92ce8

by Adrian Buehlmann

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

 
516
517
518
519
520
521
522
 
523
524
525
526
527
528
529
530
 
570
571
572
 
 
 
 
 
 
 
573
574
575
 
516
517
518
 
 
 
 
519
520
 
521
522
 
523
524
525
 
565
566
567
568
569
570
571
572
573
574
575
576
577
@@ -516,15 +516,10 @@
 int HgQueryDirstate(   const std::string& path, const char& filterStatus, char& outStatus)  { - struct _stat stat; - if (0 != lstat(path.c_str(), stat)) - { - TDEBUG_TRACE("HgQueryDirstate: lstat(" << path << ") failed"); + if (PathIsRoot(path.c_str()))   return 0; - }     std::string hgroot = GetHgRepoRoot(path); -   if (hgroot.empty())   return 0;   @@ -570,6 +565,13 @@
  const direntry* e = pds->root().get(relpath);   if (!e)   return 0; + + struct _stat stat; + if (0 != lstat(path.c_str(), stat)) { + TDEBUG_TRACE("HgQueryDirstate: lstat(" << path << ") failed"); + return 0; + } +   outStatus = e->status(stat);   }