# HG changeset patch # User Kevin Bullock # Date 1292296830 21600 # Node ID c1492615cdee6f3ce6b97767501226756da2638c # Parent dbc546811dd6eb672756f9266d432bb9c1101adb tag: don't check .hgtags status if --local passed Local tags don't create a commit, so we don't need to check the status of .hgtags. diff -r dbc546811dd6 -r c1492615cdee mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Dec 13 11:51:01 2010 -0600 +++ b/mercurial/localrepo.py Mon Dec 13 21:20:30 2010 -0600 @@ -296,10 +296,11 @@ date: date tuple to use if committing''' - for x in self.status()[:5]: - if '.hgtags' in x: - raise util.Abort(_('working copy of .hgtags is changed ' - '(please commit .hgtags manually)')) + if not local: + for x in self.status()[:5]: + if '.hgtags' in x: + 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) diff -r dbc546811dd6 -r c1492615cdee tests/test-tag.t --- a/tests/test-tag.t Mon Dec 13 11:51:01 2010 -0600 +++ b/tests/test-tag.t Mon Dec 13 21:20:30 2010 -0600 @@ -196,3 +196,15 @@ $ hg log -l1 --template "{desc}\n" custom tag message second line + +local tag with .hgtags modified + + $ hg tag hgtags-modified + $ hg rollback + rolling back to revision 11 (undo commit) + $ hg st + M .hgtags + ? .hgtags.orig + ? editor + $ hg tag --local baz + $ hg revert --no-backup .hgtags