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: move impl of direntry::status up

nothing changed, just moved that code block

Changeset 9ab67a1275ec

Parent c494f491b120

by Adrian Buehlmann

Changes to one file · Browse files at 9ab67a1275ec Showing diff from parent c494f491b120 Diff from another changeset...

 
82
83
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
86
87
 
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
 
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
 
232
233
234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
236
237
@@ -82,6 +82,32 @@
 };     +char direntry::status(const struct _stat& stat) const +{ + switch (this->state) + { + case 'n': + if (this->mtime == (unsigned)stat.st_mtime + && this->size == (unsigned)stat.st_size +#ifndef WIN32 + && this->mode == stat.st_mode +#endif + ) + return 'C'; + else + return 'M'; + case 'm': + return 'M'; + case 'r': + return 'R'; + case 'a': + return 'A'; + default: + return '?'; + } +} + +  struct dirstate  {   char parent1[HASH_LENGTH]; @@ -206,32 +232,6 @@
 }     -char direntry::status(const struct _stat& stat) const -{ - switch (this->state) - { - case 'n': - if (this->mtime == (unsigned)stat.st_mtime - && this->size == (unsigned)stat.st_size -#ifndef WIN32 - && this->mode == stat.st_mode -#endif - ) - return 'C'; - else - return 'M'; - case 'm': - return 'M'; - case 'r': - return 'R'; - case 'a': - return 'A'; - default: - return '?'; - } -} - -  int HgQueryDirstate(   const std::string& hgroot, const char* abspath, std::string& relpath,   const dirstate*& ppd, struct _stat& rstat)