Patchwork [2,of,5] remotenames: use util.always instead of handcrafted lambda

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

Comments

Yuya Nishihara - Oct. 5, 2018, 1:29 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1538742655 -32400
#      Fri Oct 05 21:30:55 2018 +0900
# Node ID fe64178103b7155d343f0d4bb02d5ecf8f49981b
# Parent  25533575d04ebad69036892808c0e149fbefbf85
remotenames: use util.always instead of handcrafted lambda

Patch

diff --git a/hgext/remotenames.py b/hgext/remotenames.py
--- a/hgext/remotenames.py
+++ b/hgext/remotenames.py
@@ -41,6 +41,7 @@  from mercurial import (
     revsetlang,
     smartset,
     templateutil,
+    util,
 )
 
 from mercurial.utils import (
@@ -354,7 +355,7 @@  def _revsetutil(repo, subset, x, rtypes)
         kind, pattern, matcher = stringutil.stringmatcher(
             revsetlang.getstring(args[0], _('argument must be a string')))
     else:
-        matcher = lambda a: True
+        matcher = util.always
 
     revs = set()
     cl = repo.changelog