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

login
register
mail settings
Submitter Matt Harbison
Date Oct. 2, 2018, 4:30 a.m.
Message ID <7170a4598d811a1cb7bc.1538454634@Envy>
Download mbox | patch
Permalink /patch/35284/
State Accepted
Headers show

Comments

Matt Harbison - Oct. 2, 2018, 4:30 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@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.

Patch

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