~bzr/ubuntu/maverick/bzr-git/bzr-ppa

« back to all changes in this revision

Viewing changes to fetch.py

  • Committer: Jelmer Vernooij
  • Date: 2010-11-06 22:47:45 UTC
  • mfrom: (17.25.368 upstream)
  • Revision ID: jelmer@debian.org-20101106224745-ephery62e224bjup
* New upstream snapshot.
* Run testsuite as part of build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
305
305
 
306
306
 
307
307
def verify_commit_reconstruction(target_git_object_retriever, lookup_object,
308
 
    o, rev, ret_tree, parent_trees, mapping, unusual_modes):
 
308
    o, rev, ret_tree, parent_trees, mapping, unusual_modes, verifiers):
309
309
    new_unusual_modes = mapping.export_unusual_file_modes(rev)
310
310
    if new_unusual_modes != unusual_modes:
311
311
        raise AssertionError("unusual modes don't match: %r != %r" % (
312
312
            unusual_modes, new_unusual_modes))
313
313
    # Verify that we can reconstruct the commit properly
314
 
    rec_o = target_git_object_retriever._reconstruct_commit(rev, o.tree, True)
 
314
    rec_o = target_git_object_retriever._reconstruct_commit(rev, o.tree, True,
 
315
        verifiers)
315
316
    if rec_o != o:
316
317
        raise AssertionError("Reconstructed commit differs: %r != %r" % (
317
318
            rec_o, o))
377
378
        base_inv = None
378
379
    rev.inventory_sha1, inv = repo.add_inventory_by_delta(basis_id,
379
380
              inv_delta, rev.revision_id, rev.parent_ids, base_inv)
380
 
    # FIXME: Check verifiers
 
381
    # Check verifiers
381
382
    testament = StrictTestament3(rev, inv)
382
383
    calculated_verifiers = { "testament3-sha1": testament.as_sha1() }
383
384
    if roundtrip_revid is not None:
396
397
    if "verify" in debug.debug_flags:
397
398
        verify_commit_reconstruction(target_git_object_retriever, 
398
399
            lookup_object, o, rev, ret_tree, parent_trees, mapping,
399
 
            unusual_modes)
 
400
            unusual_modes, verifiers)
400
401
 
401
402
 
402
403
def import_git_objects(repo, mapping, object_iter,