Page MenuHomeSoftware Heritage

tests: Remove the SWHTag mock, use dulwich.objects.Tag instead.
ClosedPublic

Authored by vlorentz on Dec 20 2021, 12:38 PM.

Details

Summary

This mock was clunky because it didn't actually behave much like
dulwich's Tag.

Additionally, a future commit will need to access the as_raw_chunks()
method of ShaFile objects, so SWHTag isn't suitable anymore as it
would need to diverge even more by implementing its own serialization.

Diff Detail

Repository
rDLDG Git loader
Branch
weird-git
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25743
Build 40237: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 40236: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6865 (id=24876)

Rebasing onto 715fbe212d...

First, rewinding head to replay your work on top of it...
Applying: tests: Remove the SWHTag mock, use dulwich.objects.Tag instead.
Changes applied before test
commit 8d9642d37a4825b9c47d4ab17df694cfc51e160b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Dec 20 12:38:25 2021 +0100

    tests: Remove the SWHTag mock, use dulwich.objects.Tag instead.
    
    This mock was clunky because it didn't actually behave much like
    dulwich's Tag.
    
    Additionally, a future commit will need to access the as_raw_chunks()
    method of ShaFile objects, so SWHTag isn't suitable anymore as it
    would need to diverge even more by implementing its own serialization.

See https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/157/ for more details.

olasd added a subscriber: olasd.

Great, thanks!

This revision is now accepted and ready to land.Dec 20 2021, 2:59 PM
This revision was landed with ongoing or failed builds.Dec 20 2021, 4:09 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D6865 (id=24877)

Rebasing onto 0cc96c25ab...

First, rewinding head to replay your work on top of it...
Fast-forwarded diff-target to base-revision-158-D6865.
Changes applied before test

See https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/158/ for more details.