##// END OF EJS Templates
perf: add a --from flag to perfmergecalculate...
marmoute -
r42573:e3ee707d default
parent child Browse files
Show More
@@ -964,16 +964,24 def perfdirstatewrite(ui, repo, **opts):
964 964 fm.end()
965 965
966 966 @command(b'perfmergecalculate',
967 [(b'r', b'rev', b'.', b'rev to merge against')] + formatteropts)
967 [
968 (b'r', b'rev', b'.', b'rev to merge against'),
969 (b'', b'from', b'', b'rev to merge from'),
970 ] + formatteropts)
968 971 def perfmergecalculate(ui, repo, rev, **opts):
969 972 opts = _byteskwargs(opts)
970 973 timer, fm = gettimer(ui, opts)
974
975 if opts['from']:
976 fromrev = scmutil.revsingle(repo, opts['from'])
977 wctx = repo[fromrev]
978 else:
971 979 wctx = repo[None]
980 # we don't want working dir files to be stat'd in the benchmark, so
981 # prime that cache
982 wctx.dirty()
972 983 rctx = scmutil.revsingle(repo, rev, rev)
973 984 ancestor = wctx.ancestor(rctx)
974 # we don't want working dir files to be stat'd in the benchmark, so prime
975 # that cache
976 wctx.dirty()
977 985 def d():
978 986 # acceptremote is True because we don't want prompts in the middle of
979 987 # our benchmark
General Comments 0
You need to be logged in to leave comments. Login now