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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue May 29 22:23:13 UTC 2018


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

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)



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


More information about the Mercurial-devel mailing list