##// 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 968 (b'r', b'rev', b'.', b'rev to merge against'),
969 969 (b'', b'from', b'', b'rev to merge from'),
970 (b'', b'base', b'', b'the revision to use as base'),
970 971 ] + formatteropts)
971 972 def perfmergecalculate(ui, repo, rev, **opts):
972 973 opts = _byteskwargs(opts)
@@ -981,7 +982,18 b' def perfmergecalculate(ui, repo, rev, **'
981 982 # prime that cache
982 983 wctx.dirty()
983 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 997 def d():
986 998 # acceptremote is True because we don't want prompts in the middle of
987 999 # our benchmark
General Comments 0
You need to be logged in to leave comments. Login now