我必须编写一个自动从mercurial repo中提取的脚本。 无论如何我可以执行
hg pull -u code>，包括在同一命令中传递请求的用户名和密码？ 我知道有一个交互方法是默认行为，我不想在hgrc或其他地方保存用户名和密码，因为它将被多个用户使用，所以有没有办法通过用户名和密码传递 命令行？
proc_open code>，但这并不像回应STDIN那样有效。 p>
I have to write a script that automates pulling from a mercurial repo. Is there anyway I can perform an
hg pull -u that includes passing the requested username and password in the same command? I know there's an interactive method which is the default behaviour, and I don't want to save the username and password in hgrc or elsewhere because it will be used by multiple users, so is there a way to pass the username and password via the command line?
I tried using
proc_open in PHP but that wasn't working as well as echoing out to STDIN.