Skip to content
Snippets Groups Projects
Commit 237f0c0c authored by Abderrahim Kitouni's avatar Abderrahim Kitouni
Browse files

handle the new tag cache in mercurial crew

parent c5e5e784
No related branches found
No related tags found
No related merge requests found
......@@ -33,4 +33,17 @@
else: #pragma: no cover
return super(hgrepo, self).findoutgoing(remote, base, heads, force)
def _findtags(self):
(tags, tagtypes) = super(hgrepo, self)._findtags()
git = GitHandler(self, self.ui)
for tag, rev in git.tags.iteritems():
if tag in tags:
continue
tags[tag] = bin(rev)
tagtypes[tag] = 'git'
return (tags, tagtypes)
def tags(self):
......@@ -36,6 +49,10 @@
def tags(self):
if not hasattr(self, 'tagscache'):
# mercurial 1.4
return super(hgrepo, self).tags()
if self.tagscache:
return self.tagscache
git = GitHandler(self, self.ui)
tagscache = super(hgrepo, self).tags()
......@@ -37,11 +54,15 @@
if self.tagscache:
return self.tagscache
git = GitHandler(self, self.ui)
tagscache = super(hgrepo, self).tags()
tagscache.update(dict([(tag, bin(rev)) for (tag,rev) in git.tags.iteritems()]))
tagstypes = dict([(tag, 'git') for tag in git.tags])
self._tagstypecache.update(tagstypes)
for tag, rev in git.tags.iteritems():
if tag in tagscache:
continue
tagscache[tag] = bin(rev)
self._tagstypecache[tag] = 'git'
return tagscache
return hgrepo
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment