Patchwork D6336: localrepo: don't use defaults arguments that will never be overridden

login
register
mail settings
Submitter phabricator
Date May 3, 2019, 11:12 p.m.
Message ID <d4f1f1f6fc1d19b0bb5ab8b7001fcbe2@localhost.localdomain>
Download mbox | patch
Permalink /patch/39937/
State Not Applicable
Headers show

Comments

phabricator - May 3, 2019, 11:12 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG39b63f9d7464: localrepo: don&#039;t use defaults arguments that will never be overridden (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6336?vs=14992&id=14996

REVISION DETAIL
  https://phab.mercurial-scm.org/D6336

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2538,12 +2538,12 @@ 
                         _('note: commit message saved in %s\n') % msgfn)
                 raise
 
-        def commithook(node=hex(ret), parent1=hookp1, parent2=hookp2):
+        def commithook():
             # hack for command that use a temporary commit (eg: histedit)
             # temporary commit got stripped before hook release
             if self.changelog.hasnode(ret):
-                self.hook("commit", node=node, parent1=parent1,
-                          parent2=parent2)
+                self.hook("commit", node=hex(ret), parent1=hookp1,
+                          parent2=hookp2)
         self._afterlock(commithook)
         return ret