Submitter | Siddharth Agarwal |
---|---|
Date | April 2, 2015, 10:51 p.m. |
Message ID | <e8023e64800c8a009eac.1428015114@devbig136.prn2.facebook.com> |
Download | mbox | patch |
Permalink | /patch/8461/ |
State | Accepted |
Headers | show
Return-Path: <mercurial-devel-bounces@selenic.com> X-Original-To: patchwork@patchwork.serpentine.com Delivered-To: patchwork@patchwork.serpentine.com Received: from waste.org (waste.org [173.11.57.241]) by bz.selenic.com (Postfix) with ESMTP id 787CE3BBD5 for <patchwork@patchwork.serpentine.com>; Thu, 2 Apr 2015 18:55:44 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by waste.org (Postfix) with ESMTP id 0982574031; Thu, 2 Apr 2015 17:55:44 -0500 (CDT) X-Virus-Scanned: Debian amavisd-new at waste.org Received: from waste.org ([127.0.0.1]) by localhost (waste.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uw4ea8XLzQw8; Thu, 2 Apr 2015 17:55:43 -0500 (CDT) Received: from waste.org (localhost [127.0.0.1]) by waste.org (Postfix) with ESMTP id CF2E0740DB; Thu, 2 Apr 2015 17:52:20 -0500 (CDT) X-Original-To: mercurial-devel@waste.org Delivered-To: mercurial-devel@waste.org Received: from localhost (localhost [127.0.0.1]) by waste.org (Postfix) with ESMTP id 08AC1740DA for <mercurial-devel@waste.org>; Thu, 2 Apr 2015 17:52:18 -0500 (CDT) X-Virus-Scanned: Debian amavisd-new at waste.org Received: from waste.org ([127.0.0.1]) by localhost (waste.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xwG55eLyJm8F for <mercurial-devel@waste.org>; Thu, 2 Apr 2015 17:52:16 -0500 (CDT) Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by waste.org (Postfix) with ESMTPS id 3E698740A8 for <mercurial-devel@selenic.com>; Thu, 2 Apr 2015 17:51:55 -0500 (CDT) Received: from pps.filterd (m0004003 [127.0.0.1]) by mx0b-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id t32MnIqQ008893 for <mercurial-devel@selenic.com>; Thu, 2 Apr 2015 15:51:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=content-type : mime-version : content-transfer-encoding : subject : message-id : in-reply-to : references : date : from : to; s=facebook; bh=dd7eq7EVyvRO6jHJm5M9gD/p54hvDDLCK9CvGJcOM8Y=; b=FuTqDZnwiyyK2qEtA7v1BpPaKptt0w8YvMrdetrjTRtepcZFLMnejs360c9Mx20UVzBj Ya4XIJkTNM63uNrtubgxHg8+4RJtCNq8GV010FF4h1Iq4ybXaFGhi+q5ejowfYV4yN/h t7/YsJPSi7BmZCrSRaewi5qg9K7RRSvuo5o= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 1thds2g879-4 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for <mercurial-devel@selenic.com>; Thu, 02 Apr 2015 15:51:54 -0700 Received: from mx-out.facebook.com (192.168.52.13) by PRN-CHUB12.TheFacebook.com (192.168.16.22) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 2 Apr 2015 15:51:53 -0700 Received: from devbig136.prn2.facebook.com (2401:db00:20:7023:face:0:47:0) by mx-out.facebook.com (10.212.232.63) with ESMTP id db167f30d98a11e49bb50002c992ebde-bbf796d0 for <mercurial-devel@selenic.com>; Thu, 02 Apr 2015 15:51:53 -0700 MIME-Version: 1.0 Subject: [PATCH 5 of 6 foldmap-in-C V2] encoding.upper: factor out fallback code X-Mercurial-Node: e8023e64800c8a009eac62cfc37cc7d39484b282 X-Mercurial-Series-Index: 5 X-Mercurial-Series-Total: 6 Message-ID: <e8023e64800c8a009eac.1428015114@devbig136.prn2.facebook.com> X-Mercurial-Series-Id: <137677d5096e0e7f1f0f.1428015110@devbig136.prn2.facebook.com> In-Reply-To: <137677d5096e0e7f1f0f.1428015110@devbig136.prn2.facebook.com> References: <137677d5096e0e7f1f0f.1428015110@devbig136.prn2.facebook.com> User-Agent: Mercurial-patchbomb/3.3.2+297-6c43a286c0c8 Date: Thu, 2 Apr 2015 15:51:54 -0700 From: Siddharth Agarwal <sid0@fb.com> To: <mercurial-devel@selenic.com> X-FB-Internal: Safe X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68, 1.0.33, 0.0.0000 definitions=2015-04-02_07:2015-04-02, 2015-04-02, 1970-01-01 signatures=0 X-BeenThere: mercurial-devel@selenic.com X-Mailman-Version: 2.1.18 Precedence: list List-Id: <mercurial-devel.selenic.com> List-Unsubscribe: <http://selenic.com/mailman/options/mercurial-devel>, <mailto:mercurial-devel-request@selenic.com?subject=unsubscribe> List-Archive: <http://selenic.com/pipermail/mercurial-devel/> List-Post: <mailto:mercurial-devel@selenic.com> List-Help: <mailto:mercurial-devel-request@selenic.com?subject=help> List-Subscribe: <http://selenic.com/mailman/listinfo/mercurial-devel>, <mailto:mercurial-devel-request@selenic.com?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: mercurial-devel-bounces@selenic.com Sender: "Mercurial-devel" <mercurial-devel-bounces@selenic.com> |
Comments
Siddharth Agarwal - April 2, 2015, 10:51 p.m.
Patch
diff --git a/mercurial/encoding.py b/mercurial/encoding.py --- a/mercurial/encoding.py +++ b/mercurial/encoding.py @@ -338,7 +338,9 @@ def upper(s): try: return asciiupper(s) except UnicodeDecodeError: - pass + return upperfallback(s) + +def upperfallback(s): try: if isinstance(s, localstr): u = s._utf8.decode("utf-8")