Skip to content
Snippets Groups Projects
Commit 132fb69a authored by Adrian Sampson's avatar Adrian Sampson
Browse files

use new names for tags cache attributes if they're available

parent 50c8d033
No related branches found
Tags 0.8.1
No related merge requests found
......@@ -60,10 +60,6 @@
return {}
def tags(self):
if not hasattr(self, 'tagscache'):
# mercurial 1.4
tmp = super(hgrepo, self).tags()
tmp.update(self.gitrefs())
return tmp
if self.tagscache:
if hasattr(self, 'tagscache') and self.tagscache:
# Mercurial 1.4 and earlier.
return self.tagscache
......@@ -69,4 +65,7 @@
return self.tagscache
elif hasattr(self, '_tags') and self._tags:
# Mercurial 1.5 and later.
return self._tags
git = GitHandler(self, self.ui)
tagscache = super(hgrepo, self).tags()
......@@ -70,8 +69,9 @@
git = GitHandler(self, self.ui)
tagscache = super(hgrepo, self).tags()
tagscache.update(self.gitrefs())
for tag, rev in git.tags.iteritems():
if tag in tagscache:
continue
tagscache[tag] = bin(rev)
......@@ -73,9 +73,11 @@
for tag, rev in git.tags.iteritems():
if tag in tagscache:
continue
tagscache[tag] = bin(rev)
self._tagstypecache[tag] = 'git'
if hasattr(self, '_tagstypecache'):
# Only present in Mercurial 1.3 and earlier.
self._tagstypecache[tag] = 'git'
return tagscache
......
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