changeset 43652:ba5c39b9324c

tags: 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/D7404
author Augie Fackler <augie@google.com>
date Thu, 14 Nov 2019 15:28:44 -0500
parents aeed2f106213
children 6186c2a53ea5
files mercurial/tags.py
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/tags.py	Thu Nov 14 15:28:34 2019 -0500
+++ b/mercurial/tags.py	Thu Nov 14 15:28:44 2019 -0500
@@ -571,7 +571,18 @@
 
     if not local:
         m = matchmod.exact([b'.hgtags'])
-        if any(repo.status(match=m, unknown=True, ignored=True)):
+        st = repo.status(match=m, unknown=True, ignored=True)
+        if any(
+            (
+                st.modified,
+                st.added,
+                st.removed,
+                st.deleted,
+                st.unknown,
+                st.ignored,
+                st.clean,
+            )
+        ):
             raise error.Abort(
                 _(b'working copy of .hgtags is changed'),
                 hint=_(b'please commit .hgtags manually'),