Patchwork [1,of,2] fsmonitor: fix silly "*kwargs" bug in merge.update() override

login
register
mail settings
Submitter via Mercurial-devel
Date May 22, 2017, 6:22 p.m.
Message ID <bdc4861ffe597d6dc0c1.1495477352@martinvonz.svl.corp.google.com>
Download mbox | patch
Permalink /patch/20835/
State Accepted
Headers show

Comments

via Mercurial-devel - May 22, 2017, 6:22 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1495474892 25200
#      Mon May 22 10:41:32 2017 -0700
# Node ID bdc4861ffe597d6dc0c19b57dcb98edaf5aaa89f
# Parent  e8c043375b53b30c4b468687f08323cbeeb452ef
fsmonitor: fix silly "*kwargs" bug in merge.update() override

Everyone knows that it's supposed to be spelled with two asterisks.

It started failing in fad5e299cfc7 (update: accept --merge to allow
merging across topo branches (issue5125), 2017-02-13) because until
then there was only one argument that was covered by the kwargs, so
*kwargs or **kwargs both worked (or at least that's what I think with
my limited understanding of Python).

Patch

diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -669,7 +669,7 @@ 
     with state_update(repo, node, distance, partial):
         return orig(
             repo, node, branchmerge, force, ancestor, mergeancestor,
-            labels, matcher, *kwargs)
+            labels, matcher, **kwargs)
 
 def reposetup(ui, repo):
     # We don't work with largefiles or inotify