Submitter | Siddharth Agarwal |
---|---|
Date | Sept. 12, 2014, 7:48 p.m. |
Message ID | <0302b4d0355c43000ceb.1410551313@devbig136.prn2.facebook.com> |
Download | mbox | patch |
Permalink | /patch/5805/ |
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 266E53BBD7 for <patchwork@patchwork.serpentine.com>; Fri, 12 Sep 2014 15:49:01 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by waste.org (Postfix) with ESMTP id B9FEC743E0; Fri, 12 Sep 2014 14:48:59 -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 rZLmDd+Qamth; Fri, 12 Sep 2014 14:48:59 -0500 (CDT) Received: from waste.org (localhost [127.0.0.1]) by waste.org (Postfix) with ESMTP id DAA4C7439B; Fri, 12 Sep 2014 14:48:48 -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 22A127439A for <mercurial-devel@waste.org>; Fri, 12 Sep 2014 14:48:45 -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 HDJ9woDnv6Je for <mercurial-devel@waste.org>; Fri, 12 Sep 2014 14:48:42 -0500 (CDT) Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by waste.org (Postfix) with ESMTP id 5B25C74215 for <mercurial-devel@selenic.com>; Fri, 12 Sep 2014 14:48:40 -0500 (CDT) Received: from pps.filterd (m0004077 [127.0.0.1]) by mx0b-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id s8CJllQC001433 for <mercurial-devel@selenic.com>; Fri, 12 Sep 2014 12:48:40 -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=11XYup3nVYZ7b7YxNtg9UCMUP1UqTB6a2p1niUUJ1u4=; b=fy1AQaHkA4TqJlFiiv4eiVqiD4ApZ72CXvEpUg4XO09Os5Uh9HrAOQmArjmyoiMLEmXy hMm41HyBmEUU1fiuDmD/ZRrvf/l86MBRAkdewMEHFxbrIpR2XDh2eI6iE03Uyp1ptqhQ 66G7h4vnMlGMMVhTxKwY1Nzq1uF9tHZywSY= Received: from mail.thefacebook.com (mailwest.thefacebook.com [173.252.71.148]) by mx0b-00082601.pphosted.com with ESMTP id 1pc37k1e9j-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK) for <mercurial-devel@selenic.com>; Fri, 12 Sep 2014 12:48:39 -0700 Received: from mx-out.facebook.com (192.168.57.29) by PRN-CHUB13.TheFacebook.com (192.168.16.23) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 12 Sep 2014 12:48:38 -0700 Received: from devbig136.prn2.facebook.com (2401:db00:20:7023:face:0:47:0) by mx-out.facebook.com (10.223.100.99) with ESMTP id c969c77a3ab511e4ae4e24be05956610-3ae23f0 for <mercurial-devel@selenic.com>; Fri, 12 Sep 2014 12:48:37 -0700 MIME-Version: 1.0 Subject: [PATCH 2 of 6] convert: for git's getchanges, use explicit index for iteration X-Mercurial-Node: 0302b4d0355c43000cebb037c2857eb8305178da X-Mercurial-Series-Index: 2 X-Mercurial-Series-Total: 6 Message-ID: <0302b4d0355c43000ceb.1410551313@devbig136.prn2.facebook.com> X-Mercurial-Series-Id: <8010fe5fc2651dd75a2c.1410551312@devbig136.prn2.facebook.com> In-Reply-To: <8010fe5fc2651dd75a2c.1410551312@devbig136.prn2.facebook.com> References: <8010fe5fc2651dd75a2c.1410551312@devbig136.prn2.facebook.com> User-Agent: Mercurial-patchbomb/3.1+86-d34058dd3246 Date: Fri, 12 Sep 2014 12:48:33 -0700 From: Siddharth Agarwal <sid0@fb.com> To: <mercurial-devel@selenic.com> X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52, 1.0.28, 0.0.0000 definitions=2014-09-12_07:2014-09-12, 2014-09-12, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 circleOfTrustscore=614.36 compositescore=0.997379531104588 urlsuspect_oldscore=0.997379531104588 suspectscore=1 recipient_domain_to_sender_totalscore=7329 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=47479 rbsscore=0.997379531104588 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409120178 X-FB-Internal: deliver X-BeenThere: mercurial-devel@selenic.com X-Mailman-Version: 2.1.13 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: mercurial-devel-bounces@selenic.com Errors-To: mercurial-devel-bounces@selenic.com |
Comments
Siddharth Agarwal - Sept. 12, 2014, 7:48 p.m.
Patch
diff --git a/hgext/convert/git.py b/hgext/convert/git.py --- a/hgext/convert/git.py +++ b/hgext/convert/git.py @@ -190,7 +190,12 @@ entry = None subexists = False subdeleted = False - for l in fh.read().split('\x00'): + difftree = fh.read().split('\x00') + lcount = len(difftree) + i = 0 + while i < lcount: + l = difftree[i] + i += 1 if not entry: if not l.startswith(':'): continue