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: re-add main() for testing

Changeset 541224fdcdfa

Parent 284985adfc69

by Adrian Buehlmann

Changes to one file · Browse files at 541224fdcdfa Showing diff from parent 284985adfc69 Diff from another changeset...

 
347
348
349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
@@ -347,3 +347,25 @@
    return 0;  } + + +#if 0 +int main(int argc, char *argv[]) +{ + std::auto_ptr<dirstate> pd = dirstate::read(".hg/dirstate"); + time_t t; + char *s; + unsigned ix; + printf("parent1: %s\n", revhash_string(pd->parent1)); + printf("parent2: %s\n", revhash_string(pd->parent2)); + printf("entries: %d\n\n", pd->entries.size()); + for (ix = 0; ix < pd->entries.size(); ++ix) + { + t = pd->entries[ix].mtime; + s = ctime(&t); + s[strlen(s) - 1] = '\0'; + printf("%s %s\n", s, pd->entries[ix].name.c_str()); + } + return 0; +} +#endif