/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/git/remote.py

  • Committer: Jelmer Vernooij
  • Date: 2020-02-25 00:38:06 UTC
  • mfrom: (7490.3.5 work)
  • mto: (7490.40.19 work)
  • mto: This revision was merged to the branch mainline in revision 7516.
  • Revision ID: jelmer@jelmer.uk-20200225003806-7i1vt6f65ywyxqfy
Merge 3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
555
555
 
556
556
    def push_branch(self, source, revision_id=None, overwrite=False,
557
557
                    remember=False, create_prefix=False, lossy=False,
558
 
                    name=None):
 
558
                    name=None, tag_selector=None):
559
559
        """Push the source branch into this ControlDir."""
560
560
        if revision_id is None:
561
561
            # No revision supplied by the user, default to the branch
600
600
            ret[actual_refname] = new_sha
601
601
            if fetch_tags:
602
602
                for tagname, revid in viewitems(source.tags.get_tag_dict()):
 
603
                    if tag_selector and not tag_selector(tagname):
 
604
                        continue
603
605
                    if lossy:
604
 
                        new_sha = source_store._lookup_revision_sha1(revid)
 
606
                        try:
 
607
                            new_sha = source_store._lookup_revision_sha1(revid)
 
608
                        except KeyError:
 
609
                            if source.repository.has_revision(revid):
 
610
                                raise
605
611
                    else:
606
612
                        try:
607
613
                            new_sha = repo.lookup_bzr_revision_id(revid)[0]