Submitter | Yuya Nishihara |
---|---|
Date | April 20, 2018, 12:10 p.m. |
Message ID | <171c91d2e6fb2ce686d2.1524226232@mimosa> |
Download | mbox | patch |
Permalink | /patch/31204/ |
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 9745E2C15C; Fri, 20 Apr 2018 08:10:47 -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 3BWF2-eH3KK9; Fri, 20 Apr 2018 08:10:47 -0400 (EDT) Received: from mercurial-scm.org (localhost [IPv6:::1]) by mercurial-scm.org (Postfix) with ESMTP id 54FD92C1B8; Fri, 20 Apr 2018 08:10:47 -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 831A52C1B8 for <mercurial-devel@mercurial-scm.org>; Fri, 20 Apr 2018 08:10:46 -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 cfVQRkxko66t for <mercurial-devel@mercurial-scm.org>; Fri, 20 Apr 2018 08:10:46 -0400 (EDT) Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) by mercurial-scm.org (Postfix) with ESMTPS id 271462C15C for <mercurial-devel@mercurial-scm.org>; Fri, 20 Apr 2018 08:10:45 -0400 (EDT) Received: by mail-pf0-x22d.google.com with SMTP id f15so4211827pfn.0 for <mercurial-devel@mercurial-scm.org>; Fri, 20 Apr 2018 05:10:45 -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 :user-agent:date:from:to; bh=5hReYR844LWTdPkhrtN2MP5uuNFTrTZ9MZ2knzHIlyk=; b=BV5jtmz3Fbdgs/QqH2h8s44dvWGyHZKc8bCZ8oGzgORdFqZI/n5/5V0cTQRAUoiXmq DSbwN7sKw9ZuMotLsPsn9Hq6FTGQVKFBbQ+bC4zEPlylZxg8Km51NE5wWjkfSg/LosqD iiPgnSOtWm7YCMv0H1TGHNnsjVudrjw7kZAS5NqKBbemxY5cW3s4Kra3e65a8l7l4xHg qiqy0mWEA53mqSnlSN3f3xr3Vmi8Tpvm9J725JNq8t1GpezHcv0ch8f1TKI8CkTb2cRN q2djsEYDyYxhy80tDJX+02KW6P/CEZ21KjbmUfn98tlypU3CsOM457NPgUYuTk1oq654 vxJA== 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:user-agent:date:from:to; bh=5hReYR844LWTdPkhrtN2MP5uuNFTrTZ9MZ2knzHIlyk=; b=n43OHD75t6RoerDsBVmu/bvlSc1iKFcq91ASXlEjtP2fGGHU4b1wiFwGH9v23rKb41 V26jUGmdd99iYyPlo2JEx+31PQjXTdJEo8463yeCps+NAVHNh/6g+s2huLsPHMPuNIZu 3eAtIFuN9As84I8TSQKk7Aj8ZJshdxydSiYr5Lsbio2AdNCvLSTssp9FicMpGaOYBufe ecatE+gTetuX9hLmbP7wvhukm1Y/9uKU53XafAKR93Z4BZLWaMPNOdCsIM+YfaLFdKV3 b3SMOmIO1JKjPgNjyu6hpdudjvjue2GXKR6c7AO5TkxyATDw3WVuc56cFUErX0tbiIda ZwsA== X-Gm-Message-State: ALQs6tAdICquX/pr/fKwjtgqIDoqD/a8KTvrFCG08d7CYg/855Dgfreq V+T6XU+B4Go7EM/7MisRiZsoLbEN X-Google-Smtp-Source: AIpwx4/9U/jxdJxh63l0du8zm4vlM4DW/+x+6u3XOX5BTmp6dw+qph1OyrX+aZKjlboGp6d1q4DKfA== X-Received: by 10.99.191.68 with SMTP id i4mr6669238pgo.66.1524226244767; Fri, 20 Apr 2018 05:10:44 -0700 (PDT) Received: from [127.0.1.1] (p6e42c1b8.tkyea126.ap.so-net.ne.jp. [110.66.193.184]) by smtp.gmail.com with ESMTPSA id z15sm18430710pgr.55.2018.04.20.05.10.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 05:10:43 -0700 (PDT) MIME-Version: 1.0 Subject: [PATCH 1 of 3 STABLE] diffhelpers: backport 9e40bc4c1bde from C implementation X-Mercurial-Node: 171c91d2e6fb2ce686d24b34da5cc81482e0223d X-Mercurial-Series-Index: 1 X-Mercurial-Series-Total: 3 Message-Id: <171c91d2e6fb2ce686d2.1524226232@mimosa> X-Mercurial-Series-Id: <171c91d2e6fb2ce686d2.1524226232@mimosa> User-Agent: Mercurial-patchbomb/4.5.3+1930-ed5448edcbfa Date: Fri, 20 Apr 2018 21:10:32 +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 - April 20, 2018, 12:10 p.m.
Patch
diff --git a/mercurial/diffhelpers.py b/mercurial/diffhelpers.py --- a/mercurial/diffhelpers.py +++ b/mercurial/diffhelpers.py @@ -69,7 +69,7 @@ def testhunk(a, b, bstart): """ alen = len(a) blen = len(b) - if alen > blen - bstart: + if alen > blen - bstart or bstart < 0: return False for i in xrange(alen): if a[i][1:] != b[i + bstart]: