Submitter | Yuya Nishihara |
---|---|
Date | June 14, 2017, 1:40 p.m. |
Message ID | <4642ef5a653b3daa3db1.1497447633@mimosa> |
Download | mbox | patch |
Permalink | /patch/21372/ |
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 06A0A2C20E; Wed, 14 Jun 2017 09:41:06 -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 cY14RF0wGHHU; Wed, 14 Jun 2017 09:41:05 -0400 (EDT) Received: from mercurial-scm.org (localhost [IPv6:::1]) by mercurial-scm.org (Postfix) with ESMTP id 9F4852C210; Wed, 14 Jun 2017 09:41:04 -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 CB4922C1CB for <mercurial-devel@mercurial-scm.org>; Wed, 14 Jun 2017 09:41:03 -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 WGlFVW2mRhqe for <mercurial-devel@mercurial-scm.org>; Wed, 14 Jun 2017 09:41:03 -0400 (EDT) Received: from mail-pg0-x236.google.com (mail-pg0-x236.google.com [IPv6:2607:f8b0:400e:c05::236]) by mercurial-scm.org (Postfix) with ESMTPS id 785E72C1C8 for <mercurial-devel@mercurial-scm.org>; Wed, 14 Jun 2017 09:41:02 -0400 (EDT) Received: by mail-pg0-x236.google.com with SMTP id a70so396250pge.3 for <mercurial-devel@mercurial-scm.org>; Wed, 14 Jun 2017 06:41:02 -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=qfwoqNdtiATB5RnCKU5ES/SNou5jK4a7rvoCzfMQVvQ=; b=SGCqEDHkb08Ydo3UwJ3APTld745uux3L/ldxIpraqqL2OKVEB1SdfY7hC5ocllAZ3x ro1uuGkjpNst3hovKUMvc9P392f8wvvnhDXAQcpt1G0bzI7oo6eILpJy5tFIPREK1JTw qIAzuveQFPo1vaA5b6sQYgnneuyh4/S4iwfD5bVCQvaylkyF/GPsaQBWNlyFUqYLqCPH OhKOa80vw+jZoALxmWLwvpBi4qn4Mv751trYMC1+STS4VP0Zly2mhYS5HkNZJnJdH63c VXgUNd4GdMtlAgLokBhuuIDUnzQiKbhYRSHerS0zqJlDtVoo3v3PdVcse2ehocq6nFmE G+EQ== 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=qfwoqNdtiATB5RnCKU5ES/SNou5jK4a7rvoCzfMQVvQ=; b=uCIM7P1lz16mlALxh3Dbn73+47GfvRjUC/XNDumVd5esAqlTMryDRhE+mWCxGQ3J+5 VsGWxLXcBtlu2zBhBCkByy8oT1ewXnh0CB3j07hvb1m3IMohD4yU+UYAzJyL4Ys7UduY lSSAAcf9N3rwe+2+TetcCQG8t7RGsXFLXyvCgZVUKKogEkT76GuB2+1RpQ/WCYP296Gq y0EwlwryRoYDy98K+bq2JX4jXWgSX3PSt+KscmVfigryrcKJDT/HAX9Q3bG5v6wNCmao M5cfKFiZY3PPu+QfsfLczODp80Ed2i9vvyamreYvdNx75RIY4aMX2bH0Af3iAT/qHrym Cu4Q== X-Gm-Message-State: AKS2vOxwSpGmjfxN8CEcC2tE+fPqVig+hoHzB3RV9bwKknnkjhRIFKX1 cMPN8lH7StsUkjwp8Zo= X-Received: by 10.99.158.18 with SMTP id s18mr114007pgd.113.1497447662199; Wed, 14 Jun 2017 06:41:02 -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.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2017 06:41:01 -0700 (PDT) MIME-Version: 1.0 Subject: [PATCH 2 of 8] formatter: open raw template file in binary mode (BC) X-Mercurial-Node: 4642ef5a653b3daa3db1121e8bdd1351b98b28fc X-Mercurial-Series-Index: 2 X-Mercurial-Series-Total: 8 Message-Id: <4642ef5a653b3daa3db1.1497447633@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:33 +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) as f: + with open(tmpl, 'rb') as f: tmpl = f.read() return tmpl, None