D7404: tags: use field names instead of field numbers on scmutil.status
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Nov 14 21:12:01 UTC 2019
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/D7404
AFFECTED FILES
mercurial/tags.py
CHANGE DETAILS
diff --git a/mercurial/tags.py b/mercurial/tags.py
--- a/mercurial/tags.py
+++ b/mercurial/tags.py
@@ -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'),
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list