]> arthur.barton.de Git - bup.git/commitdiff
revlist_items: fix ordering in early exit detection
authorRob Browning <rlb@defaultvalue.org>
Wed, 11 Oct 2017 05:14:48 +0000 (00:14 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 13 Oct 2017 23:02:40 +0000 (18:02 -0500)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/vfs2.py

index 54d3bd34850888ec1207be2cda6803777c4284cc..8e9e9fdab57a68b0d0cf348b58255afbe0f4ecc9 100644 (file)
@@ -527,11 +527,12 @@ def revlist_items(repo, oid, names):
                                  oid=tree_oidx.decode('hex'))
         return
 
-    last_name = max(names)
+    # Revs are in reverse chronological order by default
+    last_name = min(names)
     for commit, (tree_oidx, utc) in revs:
         assert len(tree_oidx) == 40
         name = strftime('%Y-%m-%d-%H%M%S', localtime(utc))
-        if name > last_name:
+        if name < last_name:
             break
         if not name in names:
             continue