def make_tags(self, branch): """See breezy.branch.BranchFormat.make_tags().""" if (getattr(branch.repository._hgrepo, "tags", None) is not None and getattr(branch.repository, "lookup_foreign_revision_id", None) is not None): return LocalHgTags(branch) else: return DisabledTags(branch)
def __init__(self, repository, last_revision_info, tags): from breezy.tag import DisabledTags, MemoryTags self.repository = repository self._last_revision_info = last_revision_info self._revision_history_cache = None if tags is not None: self.tags = MemoryTags(tags) else: self.tags = DisabledTags(self) self._partial_revision_history_cache = [] self._last_revision_info_cache = None self._revision_id_to_revno_cache = None self._partial_revision_id_to_revno_cache = {} self._partial_revision_history_cache = [] self.base = "memory://" + osutils.rand_chars(10)
def setUp(self): super(DisabledTagsTests, self).setUp() branch = self.make_branch('.') self.tags = DisabledTags(branch)