Patchwork D2909: rebase: remove unused default argument values from conclude[memory]node()

login
register
mail settings
Submitter phabricator
Date March 21, 2018, 6:10 p.m.
Message ID <differential-rev-PHID-DREV-q6rfysfl35uyxoh6de7m-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29698/
State Superseded
Headers show

Comments

phabricator - March 21, 2018, 6:10 p.m.
martinvonz created this revision.
martinvonz added a reviewer: phillco.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  It's only "commitmsg" that we don't always pass.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: martinvonz, phillco, #hg-reviewers
Cc: mercurial-devel
phabricator - March 21, 2018, 11:12 p.m.
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.


  I wonder if it is worth creating a dedicated type to represent the fields in a commit. We have a handful of these functions around the code base where you need to pass around a bunch of values as a unit. But that would be follow-up fodder.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1026,9 +1026,8 @@ 
                      (max(destancestors),
                       ', '.join("%d" % p for p in sorted(parents))))
 
-def concludememorynode(repo, rev, p1, p2, wctx=None,
-                       commitmsg=None, editor=None, extrafn=None,
-                       keepbranches=False, date=None):
+def concludememorynode(repo, rev, p1, p2, wctx, editor, extrafn, keepbranches,
+                       date, commitmsg=None):
     '''Commit the memory changes with parents p1 and p2. Reuse commit info from
     rev but also store useful information in extra.
     Return node of committed revision.'''
@@ -1064,8 +1063,8 @@ 
         wctx.clean() # Might be reused
         return commitres
 
-def concludenode(repo, rev, p1, p2, commitmsg=None, editor=None, extrafn=None,
-                 keepbranches=False, date=None):
+def concludenode(repo, rev, p1, p2, editor, extrafn, keepbranches, date,
+                 commitmsg=None):
     '''Commit the wd changes with parents p1 and p2. Reuse commit info from rev
     but also store useful information in extra.
     Return node of committed revision.'''