~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Aaron Bentley
  • Date: 2005-09-26 15:03:16 UTC
  • mto: (1185.14.1) (1393.1.21)
  • mto: This revision was merged to the branch mainline in revision 1391.
  • Revision ID: abentley@panoramicfeedback.com-20050926150316-ed498650ab07a6ce
Fixed bug where pull throws DivergedBranches if branch is newer than upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.errors import BzrError, InvalidRevisionNumber, InvalidRevisionId, \
29
29
     DivergedBranches, NotBranchError, UnlistableStore, UnlistableBranch
30
30
from bzrlib.textui import show_status
31
 
from bzrlib.revision import Revision
 
31
from bzrlib.revision import Revision, is_ancestor
32
32
from bzrlib.delta import compare_trees
33
33
from bzrlib.tree import EmptyTree, RevisionTree
34
34
import bzrlib.xml
835
835
                                                         other_revision, self)
836
836
                assert self.last_patch() not in revision_ids
837
837
            except bzrlib.errors.NotAncestor:
838
 
                raise e
 
838
                if is_ancestor(self.last_patch(), other_revision, self):
 
839
                    revision_ids = []
 
840
                else:
 
841
                    raise e
839
842
 
840
843
        self.append_revision(*revision_ids)
841
844
        pb.clear()