1802
1802
result.source_branch = self
1803
1803
result.target_branch = target
1804
1804
result.old_revno, result.old_revid = target.last_revision_info()
1806
# We assume that during 'push' this repository is closer than
1808
graph = self.repository.get_graph(target.repository)
1809
target.update_revisions(self, stop_revision, overwrite=overwrite,
1811
result.tag_conflicts = self.tags.merge_to(target.tags, overwrite)
1805
if result.old_revid != self.last_revision():
1806
# We assume that during 'push' this repository is closer than
1808
graph = self.repository.get_graph(target.repository)
1809
target.update_revisions(self, stop_revision, overwrite=overwrite,
1811
if self._push_should_merge_tags():
1812
result.tag_conflicts = self.tags.merge_to(target.tags, overwrite)
1812
1813
result.new_revno, result.new_revid = target.last_revision_info()
1816
def _push_should_merge_tags(self):
1817
"""Should _basic_push merge this branch's tags into the target?
1819
The default implementation returns False if this branch has no tags,
1820
and True the rest of the time. Subclasses may override this.
1822
return self.tags.supports_tags() and self.tags.get_tag_dict()
1815
1824
def get_parent(self):
1816
1825
"""See Branch.get_parent."""
1817
1826
parent = self._get_parent_location()