##// 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 b' def perfdirstatewrite(ui, repo, **opts):'
964 fm.end()
964 fm.end()
965
965
966 @command(b'perfmergecalculate',
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 def perfmergecalculate(ui, repo, rev, **opts):
971 def perfmergecalculate(ui, repo, rev, **opts):
969 opts = _byteskwargs(opts)
972 opts = _byteskwargs(opts)
970 timer, fm = gettimer(ui, opts)
973 timer, fm = gettimer(ui, opts)
971 wctx = repo[None]
974
975 if opts['from']:
976 fromrev = scmutil.revsingle(repo, opts['from'])
977 wctx = repo[fromrev]
978 else:
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 rctx = scmutil.revsingle(repo, rev, rev)
983 rctx = scmutil.revsingle(repo, rev, rev)
973 ancestor = wctx.ancestor(rctx)
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 def d():
985 def d():
978 # acceptremote is True because we don't want prompts in the middle of
986 # acceptremote is True because we don't want prompts in the middle of
979 # our benchmark
987 # our benchmark
General Comments 0
You need to be logged in to leave comments. Login now