I am trying to execute hgtk log command for a particular file. But you cannot do it until you are in the repository directory.
something like this…
process.initwithpath("cmd.exe");
args = ["CD","c:\\MY_REPO"];
process.run(true,args,args.length);
process.initwithpath("hg.exe");
args= ["hgtk","my_file.txt"];
process.run(true,args,args.length);
But the problem is second process will not keep track of first one….
Any suggestions will be highly appreciated….
See the
--repositorycommand line option (short from is-R). It will change the current working directory ofhgtkbefore executing log, annotate, etc. If you provide a filename on the command line, then you should beware that they are understood relative to the argument of-R. So this works:because the
READMEfile is found relative to~/src/mercurial. This also workssince we give the full path to the
READMEfile. In this sense it works like Mercurial’s--cwdoption. Mercurial also has a-Roption, but this does not change the current working directory.