Patchwork D2693: histedit: always define update results

login
register
mail settings
Submitter phabricator
Date March 5, 2018, 6:17 a.m.
Message ID <differential-rev-PHID-DREV-va2dhzkgt4m5mhgcjmfz-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29043/
State Superseded
Headers show

Comments

phabricator - March 5, 2018, 6:17 a.m.
indygreg created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Before, we had a branch that could return None for the update stats.
  Let's just return an updateresult instance instead.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




To: indygreg, durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - March 22, 2018, 12:18 a.m.
martinvonz accepted this revision.
martinvonz added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> histedit.py:492
>          repo.dirstate.setbranch(rulectx.branch())
>          if stats and stats[3] > 0:
>              buf = repo.ui.popbuffer()

remove the "stats and" now?

REPOSITORY
  rHG Mercurial

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

To: indygreg, durin42, #hg-reviewers, martinvonz
Cc: martinvonz, mercurial-devel
phabricator - March 24, 2018, 6:03 p.m.
indygreg marked an inline comment as done.
indygreg added inline comments.

INLINE COMMENTS

> martinvonz wrote in histedit.py:492
> remove the "stats and" now?

This is done in the next commit :)

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -556,7 +556,7 @@ 
         # edits are "in place" we do not need to make any merge,
         # just applies changes on parent for editing
         cmdutil.revert(ui, repo, ctx, (wcpar, node.nullid), all=True)
-        stats = None
+        stats = mergemod.updateresult(0, 0, 0, 0)
     else:
         try:
             # ui.forcemerge is an internal variable, do not document