##// END OF EJS Templates
perf: allow to specify the base of the merge in perfmergecalculate...
marmoute -
r42574:f0bcbbb6 default
parent child Browse files
Show More
@@ -967,6 +967,7 b' def perfdirstatewrite(ui, repo, **opts):'
967 [
967 [
968 (b'r', b'rev', b'.', b'rev to merge against'),
968 (b'r', b'rev', b'.', b'rev to merge against'),
969 (b'', b'from', b'', b'rev to merge from'),
969 (b'', b'from', b'', b'rev to merge from'),
970 (b'', b'base', b'', b'the revision to use as base'),
970 ] + formatteropts)
971 ] + formatteropts)
971 def perfmergecalculate(ui, repo, rev, **opts):
972 def perfmergecalculate(ui, repo, rev, **opts):
972 opts = _byteskwargs(opts)
973 opts = _byteskwargs(opts)
@@ -981,7 +982,18 b' def perfmergecalculate(ui, repo, rev, **'
981 # prime that cache
982 # prime that cache
982 wctx.dirty()
983 wctx.dirty()
983 rctx = scmutil.revsingle(repo, rev, rev)
984 rctx = scmutil.revsingle(repo, rev, rev)
984 ancestor = wctx.ancestor(rctx)
985 if opts['base']:
986 fromrev = scmutil.revsingle(repo, opts['base'])
987 ancestor = repo[fromrev]
988 else:
989 ancestor = wctx.ancestor(rctx)
990 def d():
991 # acceptremote is True because we don't want prompts in the middle of
992 # our benchmark
993 merge.calculateupdates(repo, wctx, rctx, [ancestor], False, False,
994 acceptremote=True, followcopies=True)
995 timer(d)
996 fm.end()
985 def d():
997 def d():
986 # acceptremote is True because we don't want prompts in the middle of
998 # acceptremote is True because we don't want prompts in the middle of
987 # our benchmark
999 # our benchmark
General Comments 0
You need to be logged in to leave comments. Login now