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 std::string on dirstate::read()

Changeset 2af98cce8b08

Parent 9393e95933ab

by Adrian Buehlmann

Changes to one file · Browse files at 2af98cce8b08 Showing diff from parent 9393e95933ab Diff from another changeset...

 
121
122
123
124
 
125
126
127
 
140
141
142
143
 
144
145
 
146
147
148
 
253
254
255
256
 
257
258
259
 
121
122
123
 
124
125
126
127
 
140
141
142
 
143
144
 
145
146
147
148
 
253
254
255
 
256
257
258
259
@@ -121,7 +121,7 @@
  char parent1[HASH_LENGTH];   char parent2[HASH_LENGTH];   - static std::auto_ptr<dirstate> read(const char *path); + static std::auto_ptr<dirstate> read(const std::string& path);     void add(const direntry& e) { entries.push_back(e); }   @@ -140,9 +140,9 @@
 };     -std::auto_ptr<dirstate> dirstate::read(const char *path) +std::auto_ptr<dirstate> dirstate::read(const std::string& path)  { - FILE *f = fopen(path, "rb"); + FILE *f = fopen(path.c_str(), "rb");   if (!f)   {   TDEBUG_TRACE("dirstate::read: can't open " << path); @@ -253,7 +253,7 @@
  } else {   TDEBUG_TRACE("dirstatecache::get: reading " << hgroot);   } - iter->dstate = dirstate::read(path.c_str()).release(); + iter->dstate = dirstate::read(path).release();   TDEBUG_TRACE("dirstatecache::get: "   << iter->dstate->size() << " entries read. "   << _cache.size() << " repos in cache");