[PATCH 4 of 6] lfs: explicitly name a key when sorting blob pointers

Matt Harbison mharbison72 at gmail.com
Tue Oct 2 00:30:34 EDT 2018


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1538449498 14400
#      Mon Oct 01 23:04:58 2018 -0400
# Node ID 7170a4598d811a1cb7bc8137f48e47140dd857f5
# Parent  500ed9b2b53e0b0d0fa47e4cbde5f3d5667b4d6d
lfs: explicitly name a key when sorting blob pointers

This is needed to keep py3 happy.  The other two instances of sorting already
did this.

diff --git a/hgext/lfs/wrapper.py b/hgext/lfs/wrapper.py
--- a/hgext/lfs/wrapper.py
+++ b/hgext/lfs/wrapper.py
@@ -333,7 +333,7 @@ def extractpointers(repo, revs):
             for p in pointersfromctx(ctx).values():
                 pointers[p.oid()] = p
             progress.increment()
-        return sorted(pointers.values())
+        return sorted(pointers.values(), key=lambda p: p.oid())
 
 def pointerfromctx(ctx, f, removed=False):
     """return a pointer for the named file from the given changectx, or None if


More information about the Mercurial-devel mailing list