/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/fetch.py

  • Committer: Jelmer Vernooij
  • Date: 2019-10-28 01:38:39 UTC
  • mto: This revision was merged to the branch mainline in revision 7412.
  • Revision ID: jelmer@jelmer.uk-20191028013839-q63zzm4yr0id9b3o
Allow unknown extras in git commits when just inspecting revisions, rather than importing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
378
378
 
379
379
 
380
380
def import_git_commit(repo, mapping, head, lookup_object,
381
 
                      target_git_object_retriever, trees_cache):
 
381
                      target_git_object_retriever, trees_cache, strict):
382
382
    o = lookup_object(head)
383
383
    # Note that this uses mapping.revision_id_foreign_to_bzr. If the parents
384
384
    # were bzr roundtripped revisions they would be specified in the
385
385
    # roundtrip data.
386
386
    rev, roundtrip_revid, verifiers = mapping.import_commit(
387
 
        o, mapping.revision_id_foreign_to_bzr)
 
387
        o, mapping.revision_id_foreign_to_bzr, strict)
388
388
    if roundtrip_revid is not None:
389
389
        original_revid = rev.revision_id
390
390
        rev.revision_id = roundtrip_revid
482
482
            continue
483
483
        if isinstance(o, Commit):
484
484
            rev, roundtrip_revid, verifiers = mapping.import_commit(
485
 
                o, mapping.revision_id_foreign_to_bzr)
 
485
                o, mapping.revision_id_foreign_to_bzr, strict=True)
486
486
            if (repo.has_revision(rev.revision_id)
487
487
                    or (roundtrip_revid and
488
488
                        repo.has_revision(roundtrip_revid))):
515
515
                        pb.update("fetching revisions", offset + i,
516
516
                                  len(revision_ids))
517
517
                    import_git_commit(repo, mapping, head, lookup_object,
518
 
                                      target_git_object_retriever, trees_cache)
 
518
                                      target_git_object_retriever, trees_cache,
 
519
                                      strict=True)
519
520
                    last_imported = head
520
521
            except BaseException:
521
522
                repo.abort_write_group()