@@ -281,35 +281,36 @@ struct MercurialInputScheme : InputScheme
281281 /* If this is a commit hash that we already have, we don't
282282 have to pull again. */
283283 if (!(input.getRev () && pathExists (cacheDir)
284- && runProgram (hgOptions ({" log" , " -R" , cacheDir, " -r" , input.getRev ()->gitRev (), " --template" , " 1" }))
284+ && runProgram (
285+ hgOptions ({" log" , " -R" , cacheDir.string (), " -r" , input.getRev ()->gitRev (), " --template" , " 1" }))
285286 .second
286287 == " 1" )) {
287288 Activity act (*logger, lvlTalkative, actUnknown, fmt (" fetching Mercurial repository '%s'" , actualUrl));
288289
289290 if (pathExists (cacheDir)) {
290291 try {
291- runHg ({" pull" , " -R" , cacheDir, " --" , actualUrl});
292+ runHg ({" pull" , " -R" , cacheDir. string () , " --" , actualUrl});
292293 } catch (ExecError & e) {
293294 auto transJournal = cacheDir / " .hg" / " store" / " journal" ;
294295 /* hg throws "abandoned transaction" error only if this file exists */
295296 if (pathExists (transJournal)) {
296- runHg ({" recover" , " -R" , cacheDir});
297- runHg ({" pull" , " -R" , cacheDir, " --" , actualUrl});
297+ runHg ({" recover" , " -R" , cacheDir. string () });
298+ runHg ({" pull" , " -R" , cacheDir. string () , " --" , actualUrl});
298299 } else {
299300 throw ExecError (e.status , " 'hg pull' %s" , statusToString (e.status ));
300301 }
301302 }
302303 } else {
303304 createDirs (dirOf (cacheDir.string ()));
304- runHg ({" clone" , " --noupdate" , " --" , actualUrl, cacheDir});
305+ runHg ({" clone" , " --noupdate" , " --" , actualUrl, cacheDir. string () });
305306 }
306307 }
307308
308309 /* Fetch the remote rev or ref. */
309310 auto tokens = tokenizeString<std::vector<std::string>>(runHg (
310311 {" log" ,
311312 " -R" ,
312- cacheDir,
313+ cacheDir. string () ,
313314 " -r" ,
314315 input.getRev () ? input.getRev ()->gitRev () : *input.getRef (),
315316 " --template" ,
@@ -329,7 +330,7 @@ struct MercurialInputScheme : InputScheme
329330 std::filesystem::path tmpDir = createTempDir ();
330331 AutoDelete delTmpDir (tmpDir, true );
331332
332- runHg ({" archive" , " -R" , cacheDir, " -r" , rev.gitRev (), tmpDir});
333+ runHg ({" archive" , " -R" , cacheDir. string () , " -r" , rev.gitRev (), tmpDir. string () });
333334
334335 deletePath (tmpDir / " .hg_archival.txt" );
335336
0 commit comments