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,6 +982,10 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) | |
|
985 | if opts['base']: | |||
|
986 | fromrev = scmutil.revsingle(repo, opts['base']) | |||
|
987 | ancestor = repo[fromrev] | |||
|
988 | else: | |||
984 | ancestor = wctx.ancestor(rctx) |
|
989 | ancestor = wctx.ancestor(rctx) | |
985 | def d(): |
|
990 | def d(): | |
986 | # acceptremote is True because we don't want prompts in the middle of |
|
991 | # acceptremote is True because we don't want prompts in the middle of | |
@@ -989,6 +994,13 b' def perfmergecalculate(ui, repo, rev, **' | |||||
989 | acceptremote=True, followcopies=True) |
|
994 | acceptremote=True, followcopies=True) | |
990 | timer(d) |
|
995 | timer(d) | |
991 | fm.end() |
|
996 | fm.end() | |
|
997 | def d(): | |||
|
998 | # acceptremote is True because we don't want prompts in the middle of | |||
|
999 | # our benchmark | |||
|
1000 | merge.calculateupdates(repo, wctx, rctx, [ancestor], False, False, | |||
|
1001 | acceptremote=True, followcopies=True) | |||
|
1002 | timer(d) | |||
|
1003 | fm.end() | |||
992 |
|
1004 | |||
993 | @command(b'perfpathcopies', [], b"REV REV") |
|
1005 | @command(b'perfpathcopies', [], b"REV REV") | |
994 | def perfpathcopies(ui, repo, rev1, rev2, **opts): |
|
1006 | def perfpathcopies(ui, repo, rev1, rev2, **opts): |
General Comments 0
You need to be logged in to leave comments.
Login now