comparison benchmark/benchmark_utils.jl @ 1309:7fc84c2f9e1d tooling/benchmarks

Fix flag issue in hg_commit
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 26 Apr 2023 13:37:58 +0200
parents a8e76daaf2ae
children 8754d0f06ce4
comparison
equal deleted inserted replaced
1308:a8e76daaf2ae 1309:7fc84c2f9e1d
139 Make a hg commit with the provided message. If `secret` is true the commit is 139 Make a hg commit with the provided message. If `secret` is true the commit is
140 in the secret phase stopping it from being pushed. 140 in the secret phase stopping it from being pushed.
141 """ 141 """
142 function hg_commit(msg; secret=false) 142 function hg_commit(msg; secret=false)
143 if secret 143 if secret
144 secretflag = "--secret" 144 cmd = Cmd(`hg commit --verbose --secret --message $msg`, dir=sbplib_root)
145 else 145 else
146 secretflag = "" 146 cmd = Cmd(`hg commit --verbose --message $msg`, dir=sbplib_root)
147 end 147 end
148 148
149 cmd = Cmd(`hg commit --verbose $secretflag --message $msg`, dir=sbplib_root)
150 out = readchomp(addenv(cmd, "HGPLAIN"=>"")) 149 out = readchomp(addenv(cmd, "HGPLAIN"=>""))
151 150
152 return only(match(r"committed changeset \d+:([0-9a-z]+)", out)) 151 return only(match(r"committed changeset \d+:([0-9a-z]+)", out))
153 end 152 end
154 153