Skip to content

Fix running git lb-push with Python 3

Chris Burr requested to merge lb-push-py3 into master

As discovered by @nskidmor, git lb-push fails with the unstable flavour of LbEnv due to a Python 3 incompatibility.

[nskidmor@lxplus7108 refs]$ git lb-push DaVinci 2018strippingnightlies
Traceback (most recent call last):
  File "/cvmfs/", line 8, in <module>
  File "/cvmfs/", line 262, in main
    for commit in sorted(commits_to_consider, cmp=commits_cmp):
TypeError: 'cmp' is an invalid keyword argument for sort()

The issue is that the cmp argument to sorted no longer exists. This PR modifies it to use the commit time as a key. I think this is good enough for lb-push but I'm not certain.

Merge request reports