Submitter | Yuya Nishihara |
---|---|
Date | June 14, 2017, 1:40 p.m. |
Message ID | <b1c1aab629501208e0b8.1497447634@mimosa> |
Download | mbox | patch |
Permalink | /patch/21373/ |
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 A66B12C1EE; Wed, 14 Jun 2017 09:41:09 -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 hX8YQ890l7q0; Wed, 14 Jun 2017 09:41:09 -0400 (EDT) Received: from mercurial-scm.org (localhost [IPv6:::1]) by mercurial-scm.org (Postfix) with ESMTP id 1574C2C210; Wed, 14 Jun 2017 09:41:09 -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 2F9FE2C211 for <mercurial-devel@mercurial-scm.org>; Wed, 14 Jun 2017 09:41:07 -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 wEOPn0DtNRI9 for <mercurial-devel@mercurial-scm.org>; Wed, 14 Jun 2017 09:41:06 -0400 (EDT) Received: from mail-pg0-x22a.google.com (mail-pg0-x22a.google.com [IPv6:2607:f8b0:400e:c05::22a]) by mercurial-scm.org (Postfix) with ESMTPS id 7ED092C1EE for <mercurial-devel@mercurial-scm.org>; Wed, 14 Jun 2017 09:41:05 -0400 (EDT) Received: by mail-pg0-x22a.google.com with SMTP id f185so449476pgc.0 for <mercurial-devel@mercurial-scm.org>; Wed, 14 Jun 2017 06:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:mime-version:content-transfer-encoding:subject:message-id :in-reply-to:references:user-agent:date:from:to; bh=gnUK8QCrtfNfl8EfSluCSDrBdxxQ5QIZBAjS2SajXFM=; b=pRWztWCvsfMga1RAOFsQ5P7d9/lPmou8O7GsWqYdx5OxAdHYwEdQTeXW8DS6GZyBER EjrWAKG9bU0HH/GqtuTSfg72fyitXlGGbYME+A6AQZzdgFqfg0uhYPRHBs8V+q44MM4Y Lo9mFYwQ0rAcGwSdL/yy1HxJ3Y7+WGnBLCE3zGcjrAsWc+m9nek5ffhys6LEM0wWcIew DEpGttVNWd5nf7Bf+KbIrGLp17MJ6E8Qz38yfibP00PpLAABb4JrFGAc9P9cNdnJPB8X t+G0hbFCb0KOuht4mrKkH40KwH8NmlS8vBaOwPqHS0YvBaZXVAMozZzmz09JLaeTLjXX V0iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:mime-version:content-transfer-encoding :subject:message-id:in-reply-to:references:user-agent:date:from:to; bh=gnUK8QCrtfNfl8EfSluCSDrBdxxQ5QIZBAjS2SajXFM=; b=GzQmRddsal5Igfv+CzCXGlhnv9zNl4puk/e6Nwej8CHPEcX19KWejEbFUOXARzVv+D 82fGAe2I8UZeo59LW2AV+MuJvTh0Q+bHLZigkdGmk3AgYdxHlvnO1ym0QCVyx5Uk7jqx 2senBI6xSvTbZZPjAy4LgFflo46bLwzekSUhXkDEdVkPA6hqcJXJvq1BIjYQBWnDnaW+ I8YDAFRhYm0A9Jl3Fpg4N5MsVzpnnwbesEsMAY46hMdxaIA5DgF8CC2VuGr2+ndSP2bm Zfi9ST8OxHkt8xqRYnWUhfuBnDz79gd/vRR23YhgnzaRvWhVQl5rLy3Ez1tgKv4pM4ov jkOw== X-Gm-Message-State: AKS2vOzF+QOWc4f+7ivXF/3Xam3K+dRBxViBw3nleBz7fqbNiuG2rMkt j+h9GXu73G4XhoytMQo= X-Received: by 10.99.125.8 with SMTP id y8mr89832pgc.267.1497447664398; Wed, 14 Jun 2017 06:41:04 -0700 (PDT) Received: from [127.0.1.1] (p784a2ae9.tkyea126.ap.so-net.ne.jp. [120.74.42.233]) by smtp.gmail.com with ESMTPSA id e2sm165045pfg.36.2017.06.14.06.41.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2017 06:41:03 -0700 (PDT) MIME-Version: 1.0 Subject: [PATCH 3 of 8] formatter: open raw template file in posix semantics X-Mercurial-Node: b1c1aab629501208e0b84b2c604328eea4311d4c X-Mercurial-Series-Index: 3 X-Mercurial-Series-Total: 8 Message-Id: <b1c1aab629501208e0b8.1497447634@mimosa> X-Mercurial-Series-Id: <ce83b5ca8a012516342b.1497447632@mimosa> In-Reply-To: <ce83b5ca8a012516342b.1497447632@mimosa> References: <ce83b5ca8a012516342b.1497447632@mimosa> User-Agent: Mercurial-patchbomb/4.2.1+668-6675d23da748 Date: Wed, 14 Jun 2017 22:40:34 +0900 From: Yuya Nishihara <yuya@tcha.org> To: mercurial-devel@mercurial-scm.org 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
Yuya Nishihara - June 14, 2017, 1:40 p.m.
Patch
diff --git a/mercurial/formatter.py b/mercurial/formatter.py --- a/mercurial/formatter.py +++ b/mercurial/formatter.py @@ -399,7 +399,7 @@ def lookuptemplate(ui, topic, tmpl): # is it a mapfile for a style? if os.path.basename(tmpl).startswith("map-"): return None, os.path.realpath(tmpl) - with open(tmpl, 'rb') as f: + with util.posixfile(tmpl, 'rb') as f: tmpl = f.read() return tmpl, None