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

Put testament sha1 in revisions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
341
341
def import_git_commit(repo, mapping, head, lookup_object,
342
342
                      target_git_object_retriever, trees_cache):
343
343
    o = lookup_object(head)
344
 
    rev = mapping.import_commit(o,
 
344
    rev, roundtrip_revid, testament_sha1 = mapping.import_commit(o,
345
345
            lambda x: target_git_object_retriever.lookup_git_sha(x)[1][0])
346
346
    # We have to do this here, since we have to walk the tree and
347
347
    # we need to make sure to import the blobs / trees with the right
376
376
        base_inv = None
377
377
    rev.inventory_sha1, inv = repo.add_inventory_by_delta(basis_id,
378
378
              inv_delta, rev.revision_id, rev.parent_ids, base_inv)
 
379
    # FIXME: Check testament_sha1
 
380
    if roundtrip_revid is not None:
 
381
        rev.revision_id = roundtrip_revid
379
382
    ret_tree = RevisionTree(repo, inv, rev.revision_id)
380
383
    trees_cache.add(ret_tree)
381
384
    repo.add_revision(rev.revision_id, rev)
414
417
        except KeyError:
415
418
            continue
416
419
        if isinstance(o, Commit):
417
 
            rev = mapping.import_commit(o, lambda x: None)
418
 
            if repo.has_revision(rev.revision_id):
 
420
            rev, roundtrip_revid, testament_sha1 = mapping.import_commit(o,
 
421
                lambda x: None)
 
422
            if (repo.has_revision(rev.revision_id) or
 
423
                (roundtrip_revid and repo.has_revision(roundtrip_revid))):
419
424
                continue
420
425
            graph.append((o.id, o.parents))
421
426
            heads.extend([p for p in o.parents if p not in checked])