changeset 39949:e1f97179a3f5

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.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 01 Oct 2018 23:04:58 -0400
parents 5ee3146c1b20
children 8d41097dfe7d
files hgext/lfs/wrapper.py tests/test-lfs.t
diffstat 2 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/lfs/wrapper.py	Mon Oct 01 21:54:00 2018 -0400
+++ b/hgext/lfs/wrapper.py	Mon Oct 01 23:04:58 2018 -0400
@@ -333,7 +333,7 @@
             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
--- a/tests/test-lfs.t	Mon Oct 01 21:54:00 2018 -0400
+++ b/tests/test-lfs.t	Mon Oct 01 23:04:58 2018 -0400
@@ -876,8 +876,6 @@
   pushing to dest
   searching for changes
   lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store
-  lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store
-  lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store
   abort: detected corrupt lfs object: 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e
   (run hg verify)
   [255]