# HG changeset patch # User Martin von Zweigbergk # Date 1499404838 25200 # Node ID ccb3e5399921db16e95e7429cc2fb9ef82ee846e # Parent 9087f9997f42ce3035e97a03bce63852a266660e sparse: access status fields by name instead of deconstructing it The status tuples has had named fields for a few years now. diff -r 9087f9997f42 -r ccb3e5399921 mercurial/sparse.py --- a/mercurial/sparse.py Sat Jul 08 13:34:19 2017 -0700 +++ b/mercurial/sparse.py Thu Jul 06 22:20:38 2017 -0700 @@ -200,9 +200,8 @@ if not enabled or not repo.vfs.exists('tempsparse'): return - origstatus = repo.status() - modified, added, removed, deleted, a, b, c = origstatus - if modified or added or removed or deleted: + s = repo.status() + if s.modified or s.added or s.removed or s.deleted: # Still have pending changes. Don't bother trying to prune. return @@ -389,13 +388,11 @@ Will abort if a file with pending changes is being excluded or included unless ``force`` is True. """ - modified, added, removed, deleted, unknown, ignored, clean = origstatus - # Verify there are no pending changes pending = set() - pending.update(modified) - pending.update(added) - pending.update(removed) + pending.update(origstatus.modified) + pending.update(origstatus.added) + pending.update(origstatus.removed) sparsematch = matcher(repo) abort = False