MCPcopy Create free account
hub / github.com/Kitware/CMake / LoadRevisions

Method LoadRevisions

Source/CTest/cmCTestHG.cxx:267–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265};
266
267bool cmCTestHG::LoadRevisions()
268{
269 // Use 'hg log' to get revisions in a xml format.
270 //
271 // TODO: This should use plumbing or python code to be more precise.
272 // The "list of strings" templates like {files} will not work when
273 // the project has spaces in the path. Also, they may not have
274 // proper XML escapes.
275 std::string range = this->OldRevision + ":" + this->NewRevision;
276 std::string hg = this->CommandLineTool;
277 std::string hgXMLTemplate = "<logentry\n"
278 " revision=\"{node|short}\">\n"
279 " <author>{author|person}</author>\n"
280 " <email>{author|email}</email>\n"
281 " <date>{date|isodate}</date>\n"
282 " <msg>{desc}</msg>\n"
283 " <files>{files}</files>\n"
284 " <file_adds>{file_adds}</file_adds>\n"
285 " <file_dels>{file_dels}</file_dels>\n"
286 "</logentry>\n";
287 std::vector<std::string> hg_log = { hg, "log", "--removed", "-r",
288 range, "--template", hgXMLTemplate };
289
290 LogParser out(this, "log-out> ");
291 out.Process("<?xml version=\"1.0\"?>\n"
292 "<log>\n");
293 OutputLogger err(this->Log, "log-err> ");
294 this->RunChild(hg_log, &out, &err);
295 out.Process("</log>\n");
296 return true;
297}
298
299bool cmCTestHG::LoadModifications()
300{

Callers 1

WriteXMLUpdatesMethod · 0.45

Calls 2

ProcessMethod · 0.45
RunChildMethod · 0.45

Tested by

no test coverage detected