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: make mapdirstate a memfun of direntry

Changeset bc36ecbbfc6e

Parent f7a80abf8b8d

by Adrian Buehlmann

Changes to one file · Browse files at bc36ecbbfc6e Showing diff from parent f7a80abf8b8d Diff from another changeset...

 
77
78
79
 
 
80
81
82
 
204
205
206
207
 
208
209
 
210
211
212
213
 
 
214
215
 
216
217
218
 
293
294
295
296
 
297
298
299
 
345
346
347
348
 
349
350
351
 
77
78
79
80
81
82
83
84
 
206
207
208
 
209
210
 
211
212
213
 
 
214
215
216
 
217
218
219
220
 
295
296
297
 
298
299
300
301
 
347
348
349
 
350
351
352
353
@@ -77,6 +77,8 @@
  unsigned mtime;   unsigned length;   std::string name; + + char mapdirstate(const struct _stat& stat) const;  };     @@ -204,15 +206,15 @@
 }     -char mapdirstate(const direntry& e, const struct _stat& stat) +char direntry::mapdirstate(const struct _stat& stat) const  { - switch (e.state) + switch (this->state)   {   case 'n': - if (e.mtime == (unsigned)stat.st_mtime - && e.size == (unsigned)stat.st_size + if (this->mtime == (unsigned)stat.st_mtime + && this->size == (unsigned)stat.st_size  #ifndef WIN32 - && e.mode == stat.st_mode + && this->mode == stat.st_mode  #endif   )   return 'C'; @@ -293,7 +295,7 @@
  temp += "/";   temp += e.name;   if (0 == lstat(temp.c_str(), stat)) - modified = (mapdirstate(e, stat) == 'M'); + modified = (e.mapdirstate(stat) == 'M');   }   break;   case 'm': @@ -345,7 +347,7 @@
  if (relpath == e.name)   {   TDEBUG_TRACE("HgQueryDirstateFile: found relpath"); - outStatus = mapdirstate(e, stat); + outStatus = e.mapdirstate(stat);   TDEBUG_TRACE("HgQueryDirstateFile: outStatus = " << outStatus);   return outStatus != '?';   }