Mercurial > hg-stable
comparison mercurial/subrepo.py @ 43695:aeed2f106213
subrepo: 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/D7403
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 14 Nov 2019 15:28:34 -0500 |
parents | 9f70512ae2cf |
children | be8552f25cab |
comparison
equal
deleted
inserted
replaced
43694:d212d657ba0e | 43695:aeed2f106213 |
---|---|
1993 | 1993 |
1994 output = b"" | 1994 output = b"" |
1995 if match.always(): | 1995 if match.always(): |
1996 output += self._gitcommand(cmd) + b'\n' | 1996 output += self._gitcommand(cmd) + b'\n' |
1997 else: | 1997 else: |
1998 st = self.status(node2)[:3] | 1998 st = self.status(node2) |
1999 files = [f for sublist in st for f in sublist] | 1999 files = [ |
2000 f | |
2001 for sublist in (st.modified, st.added, st.removed) | |
2002 for f in sublist | |
2003 ] | |
2000 for f in files: | 2004 for f in files: |
2001 if match(f): | 2005 if match(f): |
2002 output += self._gitcommand(cmd + [b'--', f]) + b'\n' | 2006 output += self._gitcommand(cmd + [b'--', f]) + b'\n' |
2003 | 2007 |
2004 if output.strip(): | 2008 if output.strip(): |