Patchwork D2924: rebase: rename conclude[memory]node() to commit[memory]node()

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

Comments

phabricator - March 21, 2018, 6:11 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
  The functions do little more than commit at this point.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




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


  Very nice cleanup!

REPOSITORY
  rHG Mercurial

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

To: martinvonz, phillco, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
phabricator - March 21, 2018, 11:49 p.m.
phillco added a comment.


  What _is_ the difference between "conclude" and "commit"?

REPOSITORY
  rHG Mercurial

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

To: martinvonz, phillco, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
phabricator - March 21, 2018, 11:57 p.m.
martinvonz added a comment.


  In https://phab.mercurial-scm.org/D2924#47088, @phillco wrote:
  
  > What _is_ the difference between "conclude" and "commit"?
  
  
  I had assumed it was called "conclude" because it did more than commit (the stuff that's now in _concludecommit()). There's obviously no agreed-upon definition of the terms in a hg context, so I guess we'll have to interpret it as we like.

REPOSITORY
  rHG Mercurial

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

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
@@ -459,16 +459,16 @@ 
             overrides[('ui', 'allowemptycommit')] = True
         with repo.ui.configoverride(overrides, 'rebase'):
             if self.inmemory:
-                newnode = concludememorynode(repo, p1, p2,
+                newnode = commitmemorynode(repo, p1, p2,
                     wctx=self.wctx,
                     extra=extra,
                     commitmsg=commitmsg,
                     editor=editor,
                     user=ctx.user(),
                     date=date)
                 mergemod.mergestate.clean(repo)
             else:
-                newnode = concludenode(repo, p1, p2,
+                newnode = commitnode(repo, p1, p2,
                     extra=extra,
                     commitmsg=commitmsg,
                     editor=editor,
@@ -1032,8 +1032,7 @@ 
                      (max(destancestors),
                       ', '.join("%d" % p for p in sorted(parents))))
 
-def concludememorynode(repo, p1, p2, wctx, editor, extra, user, date,
-                       commitmsg):
+def commitmemorynode(repo, p1, p2, wctx, editor, extra, user, date, commitmsg):
     '''Commit the memory changes with parents p1 and p2.
     Return node of committed revision.'''
     # Replicates the empty check in ``repo.commit``.
@@ -1052,7 +1051,7 @@ 
     wctx.clean() # Might be reused
     return commitres
 
-def concludenode(repo, p1, p2, editor, extra, user, date, commitmsg):
+def commitnode(repo, p1, p2, editor, extra, user, date, commitmsg):
     '''Commit the wd changes with parents p1 and p2.
     Return node of committed revision.'''
     dsguard = util.nullcontextmanager()