~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
880
880
                # XXX: If you unstack a branch while it has a working tree
881
881
                # with a pending merge, the pending-merged revisions will no
882
882
                # longer be present.  You can (probably) revert and remerge.
883
 
                #
884
 
                # XXX: This only fetches up to the tip of the repository; it
885
 
                # doesn't bring across any tags.  That's fairly consistent
886
 
                # with how branch works, but perhaps not ideal.
887
 
                self.repository.fetch(old_repository,
888
 
                    revision_id=self.last_revision(),
889
 
                    find_ghosts=True)
 
883
                try:
 
884
                    tags_to_fetch = set(self.tags.get_reverse_tag_dict())
 
885
                except errors.TagsNotSupported:
 
886
                    tags_to_fetch = set()
 
887
                fetch_spec = _mod_graph.NotInOtherForRevs(self.repository,
 
888
                    old_repository, required_ids=[self.last_revision()],
 
889
                    if_present_ids=tags_to_fetch, find_ghosts=True).execute()
 
890
                self.repository.fetch(old_repository, fetch_spec=fetch_spec)
890
891
            finally:
891
892
                old_repository.unlock()
892
893
        finally: