Patchwork [4,of,5] remotenames: remove unneeded sorted() from revset implementation

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 5, 2018, 1:29 p.m.
Message ID <5b90cef0b86041b89572.1538746199@mimosa>
Download mbox | patch
Permalink /patch/35487/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 5, 2018, 1:29 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1538743181 -32400
#      Fri Oct 05 21:39:41 2018 +0900
# Node ID 5b90cef0b86041b89572d4655e4507a9641c3be4
# Parent  ce04586865554a0f3017e209ec66268e3ef4091c
remotenames: remove unneeded sorted() from revset implementation

The order is constrained by the subset.

Patch

diff --git a/hgext/remotenames.py b/hgext/remotenames.py
--- a/hgext/remotenames.py
+++ b/hgext/remotenames.py
@@ -368,7 +368,7 @@  def _revsetutil(repo, subset, x, rtypes)
                 nodes.update(ns.nodes(repo, name))
 
     revs = (cl.rev(n) for n in nodes if cl.hasnode(n))
-    return subset & smartset.baseset(sorted(revs))
+    return subset & smartset.baseset(revs)
 
 @revsetpredicate('remotenames([name])')
 def remotenamesrevset(repo, subset, x):