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

  • Committer: Jelmer Vernooij
  • Date: 2019-03-02 22:31:28 UTC
  • mfrom: (7291 work)
  • mto: This revision was merged to the branch mainline in revision 7293.
  • Revision ID: jelmer@jelmer.uk-20190302223128-0qk1i5tozmzq5nyq
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
348
348
            o = self._git.object_store[sha]
349
349
            if not isinstance(o, Commit):
350
350
                continue
351
 
            rev, roundtrip_revid, verifiers = mapping.import_commit(
352
 
                o, mapping.revision_id_foreign_to_bzr)
353
 
            yield o.id, rev.revision_id, roundtrip_revid
 
351
            revid = mapping.revision_id_foreign_to_bzr(o)
 
352
            roundtrip_revid = mapping.get_revision_id(o)
 
353
            yield o.id, revid, (roundtrip_revid if revid != roundtrip_revid else None)
354
354
 
355
355
    def all_revision_ids(self):
356
356
        ret = set()
454
454
        commit = self._git.object_store.peel_sha(foreign_revid)
455
455
        if not isinstance(commit, Commit):
456
456
            raise NotCommitError(commit.id)
457
 
        rev, roundtrip_revid, verifiers = mapping.import_commit(
458
 
            commit, mapping.revision_id_foreign_to_bzr)
 
457
        revid = mapping.get_revision_id(commit)
459
458
        # FIXME: check testament before doing this?
460
 
        if roundtrip_revid:
461
 
            return roundtrip_revid
462
 
        else:
463
 
            return rev.revision_id
 
459
        return revid
464
460
 
465
461
    def has_signature_for_revision_id(self, revision_id):
466
462
        """Check whether a GPG signature is present for this revision.