Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 50848:489268c8ee7e
cmdutil: migrate `opts` on commitstatus() to native kwargs
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 19 Aug 2023 23:06:40 -0400 |
parents | 7b0cc86c5d74 |
children | 13ad1b2ad3b4 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Aug 19 22:56:14 2023 -0400 +++ b/mercurial/cmdutil.py Sat Aug 19 23:06:40 2023 -0400 @@ -3329,9 +3329,7 @@ return b"\n".join(edittext) -def commitstatus(repo, node, branch, bheads=None, tip=None, opts=None): - if opts is None: - opts = {} +def commitstatus(repo, node, branch, bheads=None, tip=None, **opts): ctx = repo[node] parents = ctx.parents() @@ -3341,7 +3339,7 @@ # for most instances repo.ui.warn(_(b"warning: commit already existed in the repository!\n")) elif ( - not opts.get(b'amend') + not opts.get('amend') and bheads and node not in bheads and not any( @@ -3378,7 +3376,7 @@ # # H H n head merge: head count decreases - if not opts.get(b'close_branch'): + if not opts.get('close_branch'): for r in parents: if r.closesbranch() and r.branch() == branch: repo.ui.status(