/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/commit.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-17 00:52:29 UTC
  • mfrom: (7131.14.4 bzr-bound-to-git)
  • Revision ID: breezy.the.bot@gmail.com-20181117005229-enwtc49hp07j1dpx
Support committing to a bzr branch bound to a git branch.

Merged from https://code.launchpad.net/~jelmer/brz/bzr-bound-to-git/+merge/355573

Show diffs side-by-side

added added

removed removed

Lines of Context:
562
562
        #       to local.
563
563
 
564
564
        # Make sure the local branch is identical to the master
565
 
        master_info = self.master_branch.last_revision_info()
566
 
        local_info = self.branch.last_revision_info()
567
 
        if local_info != master_info:
 
565
        master_revid = self.master_branch.last_revision()
 
566
        local_revid = self.branch.last_revision()
 
567
        if local_revid != master_revid:
568
568
            raise errors.BoundBranchOutOfDate(self.branch,
569
569
                                              self.master_branch)
570
570
 
588
588
            # - in a checkout scenario the tree may have no
589
589
            # parents but the branch may do.
590
590
            first_tree_parent = breezy.revision.NULL_REVISION
591
 
        old_revno, master_last = self.master_branch.last_revision_info()
 
591
        try:
 
592
            old_revno, master_last = self.master_branch.last_revision_info()
 
593
        except errors.UnsupportedOperation:
 
594
            master_last = self.master_branch.last_revision()
 
595
            old_revno = self.branch.revision_id_to_revno(master_last)
592
596
        if master_last != first_tree_parent:
593
597
            if master_last != breezy.revision.NULL_REVISION:
594
598
                raise errors.OutOfDateTree(self.work_tree)