comparison mercurial/localrepo.py @ 31995:fe9c4d614600

track-tags: compute the actual differences between tags pre/post transaction We now compute the proper actuall differences between tags before and after the transaction. This catch a couple of false positives in the tests. The compute the full difference since we are about to make this data available to hooks in the next changeset.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 28 Mar 2017 10:14:55 +0200
parents b36318e6d2ef
children e6e1884df298
comparison
equal deleted inserted replaced
31994:b36318e6d2ef 31995:fe9c4d614600
1026 oldfnodes = tagsmod.fnoderevs(repo.ui, repo, oldheads) 1026 oldfnodes = tagsmod.fnoderevs(repo.ui, repo, oldheads)
1027 newheads = repo.changelog.headrevs() 1027 newheads = repo.changelog.headrevs()
1028 newfnodes = tagsmod.fnoderevs(repo.ui, repo, newheads) 1028 newfnodes = tagsmod.fnoderevs(repo.ui, repo, newheads)
1029 # notes: we compare lists here. 1029 # notes: we compare lists here.
1030 # As we do it only once buiding set would not be cheaper 1030 # As we do it only once buiding set would not be cheaper
1031 if oldfnodes != newfnodes: 1031 changes = tagsmod.difftags(repo.ui, repo, oldfnodes, newfnodes)
1032 if changes:
1032 tr2.hookargs['tag_moved'] = '1' 1033 tr2.hookargs['tag_moved'] = '1'
1033 def validate(tr2): 1034 def validate(tr2):
1034 """will run pre-closing hooks""" 1035 """will run pre-closing hooks"""
1035 # XXX the transaction API is a bit lacking here so we take a hacky 1036 # XXX the transaction API is a bit lacking here so we take a hacky
1036 # path for now 1037 # path for now