1802
1807
result.source_branch = self
1803
1808
result.target_branch = target
1804
1809
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)
1810
if result.old_revid != self.last_revision():
1811
# We assume that during 'push' this repository is closer than
1813
graph = self.repository.get_graph(target.repository)
1814
target.update_revisions(self, stop_revision, overwrite=overwrite,
1816
if self._push_should_merge_tags():
1817
result.tag_conflicts = self.tags.merge_to(target.tags, overwrite)
1812
1818
result.new_revno, result.new_revid = target.last_revision_info()
1821
def _push_should_merge_tags(self):
1822
"""Should _basic_push merge this branch's tags into the target?
1824
The default implementation returns False if this branch has no tags,
1825
and True the rest of the time. Subclasses may override this.
1827
return self.tags.supports_tags() and self.tags.get_tag_dict()
1815
1829
def get_parent(self):
1816
1830
"""See Branch.get_parent."""
1817
1831
parent = self._get_parent_location()
2169
2183
return self._get_bound_location(False)
2171
2185
def get_stacked_on_url(self):
2172
self._check_stackable_repo()
2186
# you can always ask for the URL; but you might not be able to use it
2187
# if the repo can't support stacking.
2188
## self._check_stackable_repo()
2173
2189
stacked_url = self._get_config_location('stacked_on_location')
2174
2190
if stacked_url is None:
2175
2191
raise errors.NotStacked(self)