#8200 Update GitPython to support git >= 2.15

v1.9.0
closed
None
General
nobody
2018-09-24
2018-04-30
No

With Git >= 2.15 we get errors like TypeError: PackingType of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted' which is fixed in a newer version of GitPython:
https://github.com/gitpython-developers/GitPython/issues/687
https://github.com/gitpython-developers/GitPython/pull/689

That will be a big upgrade so we should so thorough testing. Also we should try to get some GitPython fixes merged into upstream if they haven't yet. At https://github.com/johnsca/GitPython/tree/sf-master there are fixes for [#5411], [#6000], [#6078], and [#7021]. (SourceForge uses a custom build that includes those fixes, but Allura's requirements.txt version doesn't include those)

Related

Tickets: #6000
Tickets: #6078
Tickets: #7021

Discussion

  • Dave Brondsema

    Dave Brondsema - 2018-08-09
    • status: open --> in-progress
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2018-08-09

    Changes from 0.3.2 to 2.1.11 that may affect us:

    2.0.0
    CRITICAL: Diff objects created with patch output will now not carry the — and +++ header lines anymore. All diffs now start with the @@ header line directly. Users that rely on the old behaviour can now (reliably) read this information from the a_path and b_path properties without having to parse these lines manually.

    Don't see any evidence of this being used by Allura.

    1.0.2
    IMPORTANT: Changed default object database of Repo objects to GitCmdObjectDB. The pure-python implementation used previously usually fails to release its resources (i.e. file handles), which can lead to problems when working with large repositories.

    We already use GitCmdObjectDB

    0.3.4.
    Id attribute of Commit objects is now hexsha, instead of binsha. The latter makes no sense in python 3 and I see no application of it anyway besides its artificial usage in test cases.

    Looks like binsha attribute still exists, so our continued usage of it should be ok.

    A nice new feature that could be used (esp. in last_commit_doc computations):
    https://gitpython.readthedocs.io/en/stable/reference.html#git.cmd.Git.execute kill_after_timeout parameter.

    Make sure to pip uninstall gitdb smmap so they aren't installed alongside the gitdb2 and smmap2 packages.

    The custom patches at https://github.com/johnsca/GitPython/commits/sf-master have been applied upstream already, except for https://github.com/johnsca/GitPython/commit/f7ed51ba4c8416888f5744ddb84726316c461051 which seems pretty minor and probably was just handled differently overall.

     
  • Dave Brondsema

    Dave Brondsema - 2018-08-10
    • status: in-progress --> review
     
  • Dave Brondsema

    Dave Brondsema - 2018-08-10

    db/8200 has the changes - ended up being very straightforward

     
  • Kenton Taylor - 2018-08-13
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2018-09-24
    • Milestone: unreleased --> v1.9.0
     

Log in to post a comment.