[PATCH stable] grep: don't search past the end of the searched string
Kevin Bullock
kbullock+mercurial at ringworld.org
Tue Nov 13 13:26:50 CST 2012
On Nov 13, 2012, at 11:55 AM, Nikolaj Sjujskij wrote:
> Den 2012-11-13 21:12:21 skrev Idan Kamara <idankk86 at gmail.com>:
>
>> On Tue, Nov 13, 2012 at 7:10 PM, Idan Kamara <idankk86 at gmail.com> wrote:
>>> # HG changeset patch
>>> # User Idan Kamara <idankk86 at gmail.com>
>>> # Date 1352826521 -7200
>>> # Branch stable
>>> # Node ID 42cd03020d6d6cbbab5270d8d8bc96aa9324a5e1
>>> # Parent ce2c709a8e908747376a3fda6059c1f81de321e7
>>> grep: don't search past the end of the searched string
>>
>> This was already applied on crew-default, but since it should go on
>> stable I sent it again with the fixed loop condition below.
>
>>> diff --git a/mercurial/commands.py b/mercurial/commands.py
>>> --- a/mercurial/commands.py
>>> +++ b/mercurial/commands.py
>>> @@ -2935,7 +2935,7 @@
>>> def matchlines(body):
>>> begin = 0
>>> linenum = 0
>>> - while True:
>>> + while begin < len(body):
> Won't this confuse merging stable into default, resulting in conflict (which Matt will have to resolve)? Maybe it's better to graft that changeset onto `stable` and fix loop condition with another `stable` changeset?
This is a pretty simple conflict to resolve. I wouldn't think it'd be a problem.
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
More information about the Mercurial-devel
mailing list