[PATCH 3 of 6] py3: implement __lt__() to make gitlfspointer sortable
Matt Harbison
mharbison72 at gmail.com
Sun Sep 30 05:46:22 UTC 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1538278134 14400
# Sat Sep 29 23:28:54 2018 -0400
# Node ID 96752a0137b4b08677f3205362ece3c2e7fde057
# Parent 1dd7c3dcfb46a39bc61419415c0818e0ed1bbd1c
py3: implement __lt__() to make gitlfspointer sortable
diff --git a/hgext/lfs/pointer.py b/hgext/lfs/pointer.py
--- a/hgext/lfs/pointer.py
+++ b/hgext/lfs/pointer.py
@@ -30,6 +30,9 @@ class gitlfspointer(dict):
super(gitlfspointer, self).__init__(*args)
self.update(pycompat.byteskwargs(kwargs))
+ def __lt__(self, other):
+ return self.oid() < other.oid()
+
@classmethod
def deserialize(cls, text):
try:
More information about the Mercurial-devel
mailing list