~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Aaron Bentley
  • Date: 2009-04-14 13:28:10 UTC
  • mto: This revision was merged to the branch mainline in revision 4302.
  • Revision ID: aaron@aaronbentley.com-20090414132810-byuai43ht3t4htix
Ensure references are rebased.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1060
1060
        if self._push_should_merge_tags():
1061
1061
            self.tags.merge_to(destination.tags)
1062
1062
        if getattr(self._format, 'supports_reference_locations', False):
1063
 
            reference_dict = self._get_info_dict()
1064
 
            destination._save_reference_dict(reference_dict)
 
1063
            self.update_references(destination)
 
1064
 
 
1065
    def update_references(self, target):
 
1066
        reference_dict = self._get_info_dict()
 
1067
        old_base = self.base
 
1068
        new_base = target.base
 
1069
        for file_id, (tree_path, branch_location) in (
 
1070
            reference_dict.items()):
 
1071
            branch_location = urlutils.rebase_url(branch_location,
 
1072
                                                  old_base, new_base)
 
1073
            reference_dict[file_id] = (tree_path, branch_location)
 
1074
        target._save_reference_dict(reference_dict)
1065
1075
 
1066
1076
    @needs_read_lock
1067
1077
    def check(self):