Patchwork [3,of,3] bookmarks: use basectx.__cmp__() to compare ctxs by revisions

login
register
mail settings
Submitter Yuya Nishihara
Date April 10, 2015, 2:54 p.m.
Message ID <4d8dd3850209dd1cc54b.1428677690@mimosa>
Download mbox | patch
Permalink /patch/8591/
State Rejected
Headers show

Comments

Yuya Nishihara - April 10, 2015, 2:54 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1428155239 -32400
#      Sat Apr 04 22:47:19 2015 +0900
# Node ID 4d8dd3850209dd1cc54b530a181ab7e8133ab78a
# Parent  5573f5b3f8941114b9aa14a56e27ab8d555e479b
bookmarks: use basectx.__cmp__() to compare ctxs by revisions

Patch

diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -346,7 +346,7 @@  def compare(repo, srcmarks, dstmarks,
             elif scid in repo and dcid in repo:
                 sctx = repo[scid]
                 dctx = repo[dcid]
-                if sctx.rev() < dctx.rev():
+                if sctx < dctx:
                     if validdest(repo, sctx, dctx):
                         advdst((b, scid, dcid))
                     else: