Patchwork D3670: cmdutil: don't return statedetectionpredicate function from _getrepostate()

login
register
mail settings
Submitter phabricator
Date May 29, 2018, 10:23 p.m.
Message ID <differential-rev-PHID-DREV-7prz4x4qx4htmuujevuo-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/31899/
State New
Headers show

Comments

phabricator - May 29, 2018, 10:23 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is a part of refactoring which can lead us where we can unify
  cmdutil.STATES and cmdutil.unfinishedstates easily.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -646,14 +646,14 @@ 
         if state in skip:
             continue
         if statedetectionpredicate(repo):
-            return (state, statedetectionpredicate, msgfn)
+            return (state, msgfn)
 
 def morestatus(repo, fm):
     statetuple = _getrepostate(repo)
     label = 'status.morestatus'
     if statetuple:
         fm.startitem()
-        state, statedetectionpredicate, helpfulmsg = statetuple
+        state, helpfulmsg = statetuple
         statemsg = _('The repository is in an unfinished *%s* state.') % state
         fm.write('statemsg', '%s\n',  _commentlines(statemsg), label=label)
         conmsg = _conflictsmsg(repo)