Mercurial > evolve
changeset 5980:a7a75dc3a66a stable
rewriteutil: remove now-unused `update` argument from `rewite()`
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 05 Oct 2020 09:21:59 -0700 |
parents | 4a09e95d29c9 |
children | 6ac544f0218f |
files | hgext3rd/evolve/cmdrewrite.py hgext3rd/evolve/rewind.py hgext3rd/evolve/rewriteutil.py |
diffstat | 3 files changed, 5 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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)
--- 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():