Apparent time-dependent bug in hg?

Christopher Li hg at chrisli.org
Mon Jun 13 02:07:48 UTC 2005


Hi Ted,

Long time no C. Glad to know that you are using mercurial as well.

Matt, I know exactly what the problem is:

On Sun, Jun 12, 2005 at 10:51:31AM -0700, Matt Mackall wrote:
> > This looks like it's unrelated to your other bug, but I'll start here.
> 
> +    lena = len(a)
> +    lenb = len(b)
>      while 1:
> -        if la >= len(a) or lb >= len(b): break
> -        if b[lb] < a[la]:
> -            si = lb
> -            while lb < len(b) and b[lb] < a[la] : lb += 1
> -            yield "insert", la, la, si, lb
> -        elif a[la] < b[lb]:
> -            si = la
> -            while la < len(a) and a[la] < b[lb]: la += 1
> -            yield "delete", si, la, lb, lb
> -        else:
> +        am, bm, = la, lb
> +        while lb < lenb and la < len and a[la] == b[lb] :
                                    ^^^^ This should be lena. Damm, my bad.


Chris




More information about the Mercurial mailing list