fetchMercurial: Don't fetch hashes we already have

This commit is contained in:
Eelco Dolstra 2017-11-01 18:43:11 +01:00
parent 1969f357b7
commit e026bc3b05
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 74 additions and 28 deletions

View file

@ -245,6 +245,23 @@ string runProgram(Path program, bool searchPath = false,
const Strings & args = Strings(),
const std::experimental::optional<std::string> & input = {});
struct RunOptions
{
Path program;
bool searchPath = true;
Strings args;
std::experimental::optional<std::string> input;
bool _killStderr = false;
RunOptions(const Path & program, const Strings & args)
: program(program), args(args) { };
RunOptions & killStderr(bool v) { _killStderr = true; return *this; }
};
std::pair<int, std::string> runProgram(const RunOptions & options);
class ExecError : public Error
{
public: