comparison hgext/uncommit.py @ 43643:d0310f21ee9e

uncommit: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7395
author Augie Fackler <augie@google.com>
date Thu, 14 Nov 2019 15:26:05 -0500
parents c21aca51b392
children 9d2b2df2c2ba
comparison
equal deleted inserted replaced
43642:96edd0c38740 43643:d0310f21ee9e
155 cmdutil.checknotesize(ui, opts) 155 cmdutil.checknotesize(ui, opts)
156 cmdutil.resolvecommitoptions(ui, opts) 156 cmdutil.resolvecommitoptions(ui, opts)
157 157
158 with repo.wlock(), repo.lock(): 158 with repo.wlock(), repo.lock():
159 159
160 m, a, r, d = repo.status()[:4] 160 st = repo.status()
161 m, a, r, d = st.modified, st.added, st.removed, st.deleted
161 isdirtypath = any(set(m + a + r + d) & set(pats)) 162 isdirtypath = any(set(m + a + r + d) & set(pats))
162 allowdirtywcopy = opts[ 163 allowdirtywcopy = opts[
163 b'allow_dirty_working_copy' 164 b'allow_dirty_working_copy'
164 ] or repo.ui.configbool(b'experimental', b'uncommitondirtywdir') 165 ] or repo.ui.configbool(b'experimental', b'uncommitondirtywdir')
165 if not allowdirtywcopy and (not pats or isdirtypath): 166 if not allowdirtywcopy and (not pats or isdirtypath):