~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-04 14:42:39 UTC
  • mfrom: (4048.2.4 masterbranch-update)
  • Revision ID: pqm@pqm.ubuntu.com-20090304144239-ttukklew8lkxslgy
(Jelmer) Add Branch.import_last_revision_info().

Show diffs side-by-side

added added

removed removed

Lines of Context:
395
395
            # Upload revision data to the master.
396
396
            # this will propagate merged revisions too if needed.
397
397
            if self.bound_branch:
398
 
                if not self.master_branch.repository.has_same_location(
399
 
                        self.branch.repository):
400
 
                    self._set_progress_stage("Uploading data to master branch")
401
 
                    self.master_branch.repository.fetch(self.branch.repository,
402
 
                        revision_id=self.rev_id)
403
 
                # now the master has the revision data
 
398
                self._set_progress_stage("Uploading data to master branch")
404
399
                # 'commit' to the master first so a timeout here causes the
405
400
                # local branch to be out of date
406
 
                self.master_branch.set_last_revision_info(new_revno,
407
 
                                                          self.rev_id)
 
401
                self.master_branch.import_last_revision_info(
 
402
                    self.branch.repository, new_revno, self.rev_id)
408
403
 
409
404
            # and now do the commit locally.
410
405
            self.branch.set_last_revision_info(new_revno, self.rev_id)