Patchwork D7393: split: use field names instead of field numbers on scmutil.status

login
register
mail settings
Submitter phabricator
Date Nov. 14, 2019, 9:08 p.m.
Message ID <differential-rev-PHID-DREV-art6nuuyazkl7zwgfdxo-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43195/
State Superseded
Headers show

Comments

phabricator - Nov. 14, 2019, 9:08 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  As part of my pytype adventures I want to make scmutil.status no longer a
  subclass of tuple. This is part of that process.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/split.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/split.py b/hgext/split.py
--- a/hgext/split.py
+++ b/hgext/split.py
@@ -152,7 +152,9 @@ 
         scmutil.movedirstate(repo, ctx.p1())
 
     # Any modified, added, removed, deleted result means split is incomplete
-    incomplete = lambda repo: any(repo.status()[:4])
+    def incomplete(repo):
+        st = repo.status()
+        return any((st.modified, st.added, st.removed, st.deleted))
 
     # Main split loop
     while incomplete(repo):