tag: only check the status of .hgtags
authorMatt Mackall <mpm@selenic.com>
Thu, 02 Oct 2014 18:38:10 -0500
changeset 22679 aa8ecc199892
parent 22678 bf0b5bfc24b9
child 22680 8c65cc0f3c6b
tag: only check the status of .hgtags
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Thu Oct 02 18:37:12 2014 -0500
+++ b/mercurial/localrepo.py	Thu Oct 02 18:38:10 2014 -0500
@@ -574,10 +574,10 @@
         date: date tuple to use if committing'''
 
         if not local:
-            for x in self.status(unknown=True, ignored=True):
-                if '.hgtags' in x:
-                    raise util.Abort(_('working copy of .hgtags is changed '
-                                       '(please commit .hgtags manually)'))
+            m = matchmod.exact(self.root, '', ['.hgtags'])
+            if util.any(self.status(match=m, unknown=True, ignored=True)):
+                raise util.Abort(_('working copy of .hgtags is changed '
+                                   '(please commit .hgtags manually)'))
 
         self.tags() # instantiate the cache
         self._tag(names, node, message, local, user, date, editor=editor)