changeset 22680:8c65cc0f3c6b

tag: use an abort hint
author Matt Mackall <mpm@selenic.com>
date Thu, 02 Oct 2014 18:39:57 -0500
parents aa8ecc199892
children 80b6919eb199
files mercurial/localrepo.py tests/test-tag.t
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Thu Oct 02 18:38:10 2014 -0500
+++ b/mercurial/localrepo.py	Thu Oct 02 18:39:57 2014 -0500
@@ -576,8 +576,8 @@
         if not local:
             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)'))
+                raise util.Abort(_('working copy of .hgtags is changed'),
+                                 hint=_('please commit .hgtags manually'))
 
         self.tags() # instantiate the cache
         self._tag(names, node, message, local, user, date, editor=editor)
--- a/tests/test-tag.t	Thu Oct 02 18:38:10 2014 -0500
+++ b/tests/test-tag.t	Thu Oct 02 18:39:57 2014 -0500
@@ -36,7 +36,8 @@
 
   $ echo foo >> .hgtags
   $ hg tag "bleah2"
-  abort: working copy of .hgtags is changed (please commit .hgtags manually)
+  abort: working copy of .hgtags is changed
+  (please commit .hgtags manually)
   [255]
 
   $ hg revert .hgtags