~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Andrew Bennetts
  • Date: 2008-09-16 07:39:24 UTC
  • mto: This revision was merged to the branch mainline in revision 3721.
  • Revision ID: andrew.bennetts@canonical.com-20080916073924-b3w9mk29c0c87jmm
Allow subclasses to control if _basic_push can skip tag merging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1808
1808
            graph = self.repository.get_graph(target.repository)
1809
1809
            target.update_revisions(self, stop_revision, overwrite=overwrite,
1810
1810
                                    graph=graph)
1811
 
        if self.tags.supports_tags() and self.tags.get_tag_dict():
 
1811
        if self._push_should_merge_tags():
1812
1812
            result.tag_conflicts = self.tags.merge_to(target.tags, overwrite)
1813
1813
        result.new_revno, result.new_revid = target.last_revision_info()
1814
1814
        return result
1815
1815
 
 
1816
    def _push_should_merge_tags(self):
 
1817
        """Should _basic_push merge this branch's tags into the target?
 
1818
        
 
1819
        The default implementation returns False if this branch has no tags,
 
1820
        and True the rest of the time.  Subclasses may override this.
 
1821
        """
 
1822
        return self.tags.supports_tags() and self.tags.get_tag_dict()
 
1823
 
1816
1824
    def get_parent(self):
1817
1825
        """See Branch.get_parent."""
1818
1826
        parent = self._get_parent_location()