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: use upper case Dirstate class name

Changeset d6d517d2d430

Parent 85194dd3a0cc

by Adrian Buehlmann

Changes to one file · Browse files at d6d517d2d430 Showing diff from parent 85194dd3a0cc Diff from another changeset...

 
366
367
368
369
 
370
371
372
 
377
378
379
380
 
381
382
383
 
390
391
392
393
 
394
395
396
 
403
404
405
406
 
407
408
409
410
411
412
 
 
413
414
415
 
416
417
418
 
453
454
455
456
 
457
458
459
 
466
467
468
469
 
470
471
472
473
474
475
 
476
477
478
 
530
531
532
533
 
534
535
536
 
563
564
565
566
 
567
568
569
 
622
623
624
625
 
626
627
628
 
366
367
368
 
369
370
371
372
 
377
378
379
 
380
381
382
383
 
390
391
392
 
393
394
395
396
 
403
404
405
 
406
407
408
409
410
 
 
411
412
413
414
 
415
416
417
418
 
453
454
455
 
456
457
458
459
 
466
467
468
 
469
470
471
472
473
474
 
475
476
477
478
 
530
531
532
 
533
534
535
536
 
563
564
565
 
566
567
568
569
 
622
623
624
 
625
626
627
628
@@ -366,7 +366,7 @@
 #define HASH_LENGTH 20     -class dirstate +class Dirstate  {   Directory root_;   @@ -377,7 +377,7 @@
  char parent1[HASH_LENGTH];   char parent2[HASH_LENGTH];   - static std::auto_ptr<dirstate> read(const std::string& path); + static std::auto_ptr<Dirstate> read(const std::string& path);     Directory& root() { return root_; }   @@ -390,7 +390,7 @@
  unsigned size() const { return num_entries_; }    private: - dirstate() + Dirstate()   : root_(0, ""), num_added_(0), num_entries_(0) {}     static uint32_t ntohl(uint32_t x) @@ -403,16 +403,16 @@
 };     -std::auto_ptr<dirstate> dirstate::read(const std::string& path) +std::auto_ptr<Dirstate> Dirstate::read(const std::string& path)  {   FILE *f = fopen(path.c_str(), "rb");   if (!f)   { - TDEBUG_TRACE("dirstate::read: can't open " << path); - return std::auto_ptr<dirstate>(0); + TDEBUG_TRACE("Dirstate::read: can't open " << path); + return std::auto_ptr<Dirstate>(0);   }   - std::auto_ptr<dirstate> pd(new dirstate()); + std::auto_ptr<Dirstate> pd(new Dirstate());     fread(&pd->parent1, sizeof(char), HASH_LENGTH, f);   fread(&pd->parent2, sizeof(char), HASH_LENGTH, f); @@ -453,7 +453,7 @@
 {   struct entry   { - dirstate* dstate; + Dirstate* dstate;   __time64_t mtime;   std::string hgroot;   unsigned tickcount; @@ -466,13 +466,13 @@
  static std::list<entry> _cache;    public: - static dirstate* get(const std::string& hgroot); + static Dirstate* get(const std::string& hgroot);  };    std::list<Dirstatecache::entry> Dirstatecache::_cache;     -dirstate* Dirstatecache::get(const std::string& hgroot) +Dirstate* Dirstatecache::get(const std::string& hgroot)  {   Iter iter = _cache.begin();   @@ -530,7 +530,7 @@
  } else {   TDEBUG_TRACE("Dirstatecache::get: reading " << hgroot);   } - iter->dstate = dirstate::read(path).release(); + iter->dstate = Dirstate::read(path).release();   TDEBUG_TRACE("Dirstatecache::get: "   << _cache.size() << " repos in cache");   } @@ -563,7 +563,7 @@
  || (relpath.size() > 4 && relpath.compare(0, 4, ".hg/") == 0))   return 0; // don't descend into .hg dir   - dirstate* pds = Dirstatecache::get(hgroot); + Dirstate* pds = Dirstatecache::get(hgroot);   if (!pds)   {   TDEBUG_TRACE("HgQueryDirstate: Dirstatecache::get(" << hgroot << ") returns 0"); @@ -622,7 +622,7 @@
   void testread()  { - std::auto_ptr<dirstate> pd = dirstate::read(".hg/dirstate"); + std::auto_ptr<Dirstate> pd = Dirstate::read(".hg/dirstate");   if (!pd.get()) {   printf("error: could not read .hg/dirstate\n");   return;