# HG changeset patch # User Martin von Zweigbergk # Date 1601914919 25200 # Node ID a7a75dc3a66a5028dc8a11474bf1e9e7b787d265 # Parent 4a09e95d29c9d3f96f04e3d85813226954015210 rewriteutil: remove now-unused `update` argument from `rewite()` diff -r 4a09e95d29c9 -r a7a75dc3a66a hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Mon Oct 05 08:35:17 2020 -0700 +++ b/hgext3rd/evolve/cmdrewrite.py Mon Oct 05 09:21:59 2020 -0700 @@ -734,11 +734,8 @@ if opts.get('note'): metadata[b'note'] = opts['note'] - updates = allctx[:] - if p2 is not None and root.p2() != p2: - updates.append(p2) commitopts = pycompat.byteskwargs(commitopts) - newid, unusedvariable = rewriteutil.rewrite(repo, root, updates, + newid, unusedvariable = rewriteutil.rewrite(repo, root, head, [root.p1().node(), p2.node()], @@ -854,13 +851,10 @@ commitopts['message'] = b"\n".join(msgs) commitopts['edit'] = True - updates = allctx[:] - if p2 is not None and (root.p2() != p2 or not opts['fold']): - updates.append(p2) if not commitopts['fold'] and not commitopts['date']: commitopts['date'] = root.date() commitopts = pycompat.byteskwargs(commitopts) - newid, created = rewriteutil.rewrite(repo, root, updates, head, + newid, created = rewriteutil.rewrite(repo, root, head, [root.p1().node(), p2.node()], commitopts=commitopts) @@ -1364,11 +1358,8 @@ if choice == b'duplicate': duplicate = True - updates = [] - if len(ctx.parents()) > 1: - updates = ctx.parents() extradict = {b'extra': extra} - new, unusedvariable = rewriteutil.rewrite(repo, ctx, updates, ctx, + new, unusedvariable = rewriteutil.rewrite(repo, ctx, ctx, [p1, p2], commitopts=extradict) # store touched version to help potential children diff -r 4a09e95d29c9 -r a7a75dc3a66a hgext3rd/evolve/rewind.py --- a/hgext3rd/evolve/rewind.py Mon Oct 05 08:35:17 2020 -0700 +++ b/hgext3rd/evolve/rewind.py Mon Oct 05 09:21:59 2020 -0700 @@ -368,12 +368,9 @@ p2 = ctx.p2().node() p2 = rewindmap.get(p2, p2) - updates = [] - if len(ctx.parents()) > 1: - updates = ctx.parents() commitopts = {b'extra': extra, b'date': ctx.date()} - new, unusedvariable = rewriteutil.rewrite(unfi, ctx, updates, ctx, + new, unusedvariable = rewriteutil.rewrite(unfi, ctx, ctx, [p1, p2], commitopts=commitopts) diff -r 4a09e95d29c9 -r a7a75dc3a66a hgext3rd/evolve/rewriteutil.py --- a/hgext3rd/evolve/rewriteutil.py Mon Oct 05 08:35:17 2020 -0700 +++ b/hgext3rd/evolve/rewriteutil.py Mon Oct 05 09:21:59 2020 -0700 @@ -214,7 +214,7 @@ # hg <= 5.5 (19590b126764) hasmemmergestate = False -def rewrite(repo, old, updates, head, newbases, commitopts): +def rewrite(repo, old, head, newbases, commitopts): """Return (nodeid, created) where nodeid is the identifier of the changeset generated by the rewrite process, and created is True if nodeid was actually created. If created is False, nodeid @@ -254,7 +254,6 @@ head.node(), branchmerge=False, force=True, - updatedirstate=False, wc=wctx) for pctx in head.parents(): for dst, src in copies.pathcopies(pctx, head).items():