mercurial/tags.py
changeset 41676 0531dff73d0b
parent 41194 4c5864dad8b0
child 41759 aaad36b88298
equal deleted inserted replaced
41675:ddbebce94665 41676:0531dff73d0b
   534     user: name of user to use if committing
   534     user: name of user to use if committing
   535 
   535 
   536     date: date tuple to use if committing'''
   536     date: date tuple to use if committing'''
   537 
   537 
   538     if not local:
   538     if not local:
   539         m = matchmod.exact(repo.root, '', ['.hgtags'])
   539         m = matchmod.exact(['.hgtags'])
   540         if any(repo.status(match=m, unknown=True, ignored=True)):
   540         if any(repo.status(match=m, unknown=True, ignored=True)):
   541             raise error.Abort(_('working copy of .hgtags is changed'),
   541             raise error.Abort(_('working copy of .hgtags is changed'),
   542                              hint=_('please commit .hgtags manually'))
   542                              hint=_('please commit .hgtags manually'))
   543 
   543 
   544     with repo.wlock():
   544     with repo.wlock():
   608     repo.invalidatecaches()
   608     repo.invalidatecaches()
   609 
   609 
   610     if '.hgtags' not in repo.dirstate:
   610     if '.hgtags' not in repo.dirstate:
   611         repo[None].add(['.hgtags'])
   611         repo[None].add(['.hgtags'])
   612 
   612 
   613     m = matchmod.exact(repo.root, '', ['.hgtags'])
   613     m = matchmod.exact(['.hgtags'])
   614     tagnode = repo.commit(message, user, date, extra=extra, match=m,
   614     tagnode = repo.commit(message, user, date, extra=extra, match=m,
   615                           editor=editor)
   615                           editor=editor)
   616 
   616 
   617     for name in names:
   617     for name in names:
   618         repo.hook('tag', node=hex(node), tag=name, local=local)
   618         repo.hook('tag', node=hex(node), tag=name, local=local)