comparison hgext/rebase.py @ 37028:36c4e25c3ce1

rebase: remove unused default argument values from conclude[memory]node() It's only "commitmsg" that we don't always pass. Differential Revision: https://phab.mercurial-scm.org/D2909
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 20 Mar 2018 17:25:16 -0700
parents 81b35d275a60
children 74f91bec6991
comparison
equal deleted inserted replaced
37027:81b35d275a60 37028:36c4e25c3ce1
1024 raise error.Abort(_('unable to collapse on top of %d, there is more ' 1024 raise error.Abort(_('unable to collapse on top of %d, there is more '
1025 'than one external parent: %s') % 1025 'than one external parent: %s') %
1026 (max(destancestors), 1026 (max(destancestors),
1027 ', '.join("%d" % p for p in sorted(parents)))) 1027 ', '.join("%d" % p for p in sorted(parents))))
1028 1028
1029 def concludememorynode(repo, rev, p1, p2, wctx=None, 1029 def concludememorynode(repo, rev, p1, p2, wctx, editor, extrafn, keepbranches,
1030 commitmsg=None, editor=None, extrafn=None, 1030 date, commitmsg=None):
1031 keepbranches=False, date=None):
1032 '''Commit the memory changes with parents p1 and p2. Reuse commit info from 1031 '''Commit the memory changes with parents p1 and p2. Reuse commit info from
1033 rev but also store useful information in extra. 1032 rev but also store useful information in extra.
1034 Return node of committed revision.''' 1033 Return node of committed revision.'''
1035 ctx = repo[rev] 1034 ctx = repo[rev]
1036 if commitmsg is None: 1035 if commitmsg is None:
1062 extra=extra, user=ctx.user(), branch=branch, editor=editor) 1061 extra=extra, user=ctx.user(), branch=branch, editor=editor)
1063 commitres = repo.commitctx(memctx) 1062 commitres = repo.commitctx(memctx)
1064 wctx.clean() # Might be reused 1063 wctx.clean() # Might be reused
1065 return commitres 1064 return commitres
1066 1065
1067 def concludenode(repo, rev, p1, p2, commitmsg=None, editor=None, extrafn=None, 1066 def concludenode(repo, rev, p1, p2, editor, extrafn, keepbranches, date,
1068 keepbranches=False, date=None): 1067 commitmsg=None):
1069 '''Commit the wd changes with parents p1 and p2. Reuse commit info from rev 1068 '''Commit the wd changes with parents p1 and p2. Reuse commit info from rev
1070 but also store useful information in extra. 1069 but also store useful information in extra.
1071 Return node of committed revision.''' 1070 Return node of committed revision.'''
1072 dsguard = util.nullcontextmanager() 1071 dsguard = util.nullcontextmanager()
1073 if not repo.ui.configbool('rebase', 'singletransaction'): 1072 if not repo.ui.configbool('rebase', 'singletransaction'):