Submitter | Jun Wu |
---|---|
Date | March 28, 2017, 3:02 p.m. |
Message ID | <01cb4d7bd67aca078f3c.1490713376@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/19788/ |
State | Accepted |
Headers | show
Return-Path: <mercurial-devel-bounces@mercurial-scm.org> X-Original-To: patchwork@mercurial-scm.org Delivered-To: patchwork@mercurial-scm.org Received: from localhost (localhost [127.0.0.1]) by mercurial-scm.org (Postfix) with ESMTP id 6FACA2C1AE; Tue, 28 Mar 2017 11:03:27 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at mercurial-scm.org Received: from mercurial-scm.org ([127.0.0.1]) by localhost (mercurial-scm.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mEAtmmL-JxEB; Tue, 28 Mar 2017 11:03:27 -0400 (EDT) Received: from mercurial-scm.org (localhost [IPv6:::1]) by mercurial-scm.org (Postfix) with ESMTP id 9D22A2C1CC; Tue, 28 Mar 2017 11:03:26 -0400 (EDT) X-Original-To: mercurial-devel@mercurial-scm.org Delivered-To: mercurial-devel@mercurial-scm.org Received: from localhost (localhost [127.0.0.1]) by mercurial-scm.org (Postfix) with ESMTP id 23F7A2C1CC for <mercurial-devel@mercurial-scm.org>; Tue, 28 Mar 2017 11:03:25 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at mercurial-scm.org Received: from mercurial-scm.org ([127.0.0.1]) by localhost (mercurial-scm.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id riznufLOCKQR for <mercurial-devel@mercurial-scm.org>; Tue, 28 Mar 2017 11:03:24 -0400 (EDT) Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by mercurial-scm.org (Postfix) with ESMTPS id 104412C1AE for <mercurial-devel@mercurial-scm.org>; Tue, 28 Mar 2017 11:03:20 -0400 (EDT) Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2SF1Ooj007332 for <mercurial-devel@mercurial-scm.org>; Tue, 28 Mar 2017 08:03:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=content-type : mime-version : content-transfer-encoding : subject : message-id : in-reply-to : references : date : from : to; s=facebook; bh=CXTH38FMHUwVICPOqTiCw7zdgoWWW/JniSVktHlDglY=; b=pDR28ZTggiN8RV39VZYkFOkEKqh70zyDeoPWbK5l8j1f4QP/vhPkzzvZ+YPwpQwYBC+m rSkt/xi3IkR2Pjo5LxD+RsTjTLZbIk3xXKF7uNibdnPHJn80OP9YHyMTPp0Z0LGyoFN4 9+sXZHcadX3J2G6o5hOcy6o/cbP+pejGJRg= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 29fs0fr7wj-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for <mercurial-devel@mercurial-scm.org>; Tue, 28 Mar 2017 08:03:19 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 28 Mar 2017 08:03:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=CXTH38FMHUwVICPOqTiCw7zdgoWWW/JniSVktHlDglY=; b=QGBy1hm9IMvjGTgi7LIzaAEAzE6WmF6Ph1+Qfbb2FylKfuA9l5SgP25LkF9/OhATMH65Zc3iY2PZnAVx8JKfihlzb+PT0OIEqE/im3ohjtTeZfa1N7zbaKImnGcPfYerPzRTOuvIJ49ZgMtMAO52A7ZG8NAGaY4q5aNi3OGhCTk= Authentication-Results: mercurial-scm.org; dkim=none (message not signed) header.d=none; mercurial-scm.org; dmarc=none action=none header.from=fb.com; Received: from localhost.localdomain (69.181.140.208) by MWHPR15MB1519.namprd15.prod.outlook.com (10.173.235.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Tue, 28 Mar 2017 15:03:16 +0000 MIME-Version: 1.0 Subject: [PATCH 3 of 3] rcutil: extract duplicated logic to a lambda X-Mercurial-Node: 01cb4d7bd67aca078f3ca74fdbffd5685a17defe X-Mercurial-Series-Index: 3 X-Mercurial-Series-Total: 3 Message-ID: <01cb4d7bd67aca078f3c.1490713376@localhost.localdomain> X-Mercurial-Series-Id: <f1c156c854ce36010008.1490713374@localhost.localdomain> In-Reply-To: <f1c156c854ce36010008.1490713374@localhost.localdomain> References: <f1c156c854ce36010008.1490713374@localhost.localdomain> User-Agent: Mercurial-patchbomb/4.1.1+542-b2fb0fd239b8 Date: Tue, 28 Mar 2017 08:02:56 -0700 From: Jun Wu <quark@fb.com> To: <mercurial-devel@mercurial-scm.org> X-Originating-IP: [69.181.140.208] X-ClientProxiedBy: MWHPR20CA0015.namprd20.prod.outlook.com (10.171.151.153) To MWHPR15MB1519.namprd15.prod.outlook.com (10.173.235.16) X-MS-Office365-Filtering-Correlation-Id: d18d5df7-8cd8-4446-a034-08d475eb909b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423062)(201703031133068); SRVR:MWHPR15MB1519; X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1519; 3:vB8LJxFe8zTcacR/NAn0eo7r3JB8z9Xmav11dUJ1hP1nxNwY8Vi+xvnHdSosBm92dYoC3WyjkWbH4ooQhmTa1XF4XGxV/Hw1O+YSFbWOB6CuNsU9V5NNJXBcpwG/1sWc/Ix+d6KJK38sE+TlwRiUyMX1NI0gHGZSWHSyFWwGLSRocw7nMQ0ZFw3LqAE7uIhskS6Sios/snQUpRTL2w/kKkDrI5ERb//QnA976pPUl56l57q9nhMDvuzCa+n+JYq7XdOfErz9sW7GrZ/5xj4ZLoNDCpx5gttvhL6N6nyeuT2AT8Uhz823cFxXnBDV9AMGxOG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VoLMGjVvuejD3pL/8w/Yx5/f2TZsR/LHJHlPbRBPSBkm2XGzt8Y1/bx7829k9H9uMi6BY4yHoBKTf14yrR9QjdgtSOKAwJ1XtpXOGNTSfpQhtcd5xexpqSG/RMzxbOefn2sRLjAkoPZTSnLrLGxgFDFjjTVIvAdWDfhaoulgYS0vnWVpDGWaX5YZEiUp8iSZSAthAX8wpXYTLV9PnqApKguqkw+JZ4UVF5VQzOOqwJFfxaCbfLnj X-Microsoft-Antispam-PRVS: <MWHPR15MB1519037FA9969A674E24F736CD320@MWHPR15MB1519.namprd15.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(63843785518722); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040437)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(201703131423062)(201702281528062)(201703061421062)(201703061406061)(20161123562025)(20161123555025)(20161123558025)(20161123560025)(20161123564025)(6072148); SRVR:MWHPR15MB1519; BCL:0; PCL:0; RULEID:; SRVR:MWHPR15MB1519; X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1519; 4:S/8lDRVn02X4I5/EgCNrEXWJmsW+zktu3dqpQOSqVqOhPv6MGWrEJ0ja1lfwTZZasFI9E5487xghFXpCJlsS/gFkLjbe2RkPCjuhabmDG3c/g2XZMGwK5WOqD8hEa/Vfv04u7Q2DkkH5b21P64gAe34+gHl6SYai3DxtWi/1srcfAde+oikM1gBoN+5ynF/CpR8t8Ds83oJ0YPySTxv5yrwWtFj9KVcobNvPl2EbukFi/YPt1aNv8ApZVTB5QFkUJo29sBRmXByMDqfosMVNHW1asbQzToNKrcIiBezp8m/CSR8C5JqRIZ2ttQyW5qtVs9wzm3M47aFddWPp/xQCS32mh9wyc/valSQcvLTcnsUMwGgsoIOZNYA6FYXyYT7QBsNeBiKuFoCmgw3Ax24y3/UlDsUkgcrXUVREvI1btqH8GUqVQwcnBJsLVxAzQTzwOZBt3mztcw/nQcjbTMWAae1GxaimKm4SHIdZPOwTRyqLl+O/t7OnBatjgj5AiBjT/bFFiJUIF/bUZiAq5/qeWRo47UapAI4fOSMIGeQvLiv1E9xV0jFs6UEfpRw8SVp8XRhvM1rhkKRvbjgPhAp92VTCCnSmOIzysEhdo1i/kt82gNB2OIYUVufMt1XGqJXAV4WsHnUbh8Kv13g7dzpPy444lSiyvRvHLJDZ41S6FBvuSxaj96Jb9t4MCqk8wpIeAz1pggkiNyXmTfkM/fNvLgScz8SnmNgWANwuNkcwUfiUEwKVvDsIubRZqZxAIUh91Os/j56HNJ7aeCFn29Dwo6WjAaHCfSnxj6IEPu19Sb8XF7pVtLpiDiRS8SvW3MC0 X-Forefront-PRVS: 0260457E99 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(39410400002)(39850400002)(39400400002)(39450400003)(39840400002)(61506002)(2906002)(81166006)(23726003)(6506006)(8676002)(47776003)(305945005)(66066001)(83506001)(189998001)(86362001)(4001350100001)(97756001)(5660300001)(50986999)(54356999)(7736002)(110136004)(76176999)(38730400002)(6916009)(2950100002)(6666003)(230700001)(50466002)(2351001)(55016002)(6306002)(6116002)(42186005)(3846002)(53936002)(46406003)(25786009)(33646002)(9686003); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR15MB1519; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR15MB1519; 23:wbA+VKPu/ohYot+9F8McZ/m9U05hxr2bnrN4UpXBX?= =?us-ascii?Q?VbZeBOzVY6eZpO03SKJQc7FAXo6MIuRiUZIgLjnVxiDUoG2jLzw5fwRLXAI7?= =?us-ascii?Q?R9NdEEdP1yTfKNt4hkq9qIEYphlDjYRUEa3HvLpu4Yk8hMh3Igds3YAvtp2o?= =?us-ascii?Q?sm+HTJ5reowFY2SHbcPp+7nUpG6glIgtNGMtTA54ORngl07hZBCP1Dng1cK1?= =?us-ascii?Q?AmYRpPQ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/mPGZinOyup/MI+oUN1AiMbycg3JiQXiWOoQJn1A+mQGlyJ+fvl5GzxLFMYGMGSpNj9g+547cNk3KeTTn/E1jEm8y+U2mtC6hqE9xLqVFQ==; 20:v9+HnWXGPGF31KG7l6tjoWs+HwNuegJJdFVNRCscdDX/eZugicS08lRKLH5+duWtTRH1ApTthH+ondAHLywAS13oo6zTkclnQhLOSFJwYtYtx2g1LpWpNzang7jPr4cdZM34836MjFeXTyd1PfyxtgJ4tVl2hn/3HBQGC1WRchg= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2017 15:03:16.7673 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR15MB1519 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-28_12:, , signatures=0 X-BeenThere: mercurial-devel@mercurial-scm.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <mercurial-devel.mercurial-scm.org> List-Unsubscribe: <https://www.mercurial-scm.org/mailman/options/mercurial-devel>, <mailto:mercurial-devel-request@mercurial-scm.org?subject=unsubscribe> List-Archive: <http://www.mercurial-scm.org/pipermail/mercurial-devel/> List-Post: <mailto:mercurial-devel@mercurial-scm.org> List-Help: <mailto:mercurial-devel-request@mercurial-scm.org?subject=help> List-Subscribe: <https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel>, <mailto:mercurial-devel-request@mercurial-scm.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: mercurial-devel-bounces@mercurial-scm.org Sender: "Mercurial-devel" <mercurial-devel-bounces@mercurial-scm.org> |
Comments
Jun Wu - March 28, 2017, 3:02 p.m.
Patch
diff --git a/mercurial/rcutil.py b/mercurial/rcutil.py --- a/mercurial/rcutil.py +++ b/mercurial/rcutil.py @@ -86,8 +86,7 @@ def rccomponents(): _rccomponents.extend(('path', p) for p in _expandrcpath(p)) else: - paths = defaultrcpath() + systemrcpath() - _rccomponents = [('path', os.path.normpath(p)) for p in paths] + normpaths = lambda paths: [('path', os.path.normpath(p)) for p in paths] + _rccomponents = normpaths(defaultrcpath() + systemrcpath()) _rccomponents.append(envrc) - paths = userrcpath() - _rccomponents.extend(('path', os.path.normpath(p)) for p in paths) + _rccomponents.extend(normpaths(userrcpath())) return _rccomponents