[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] revision.cc::find_least_common_ancestor bug, test a
From: |
Joel Rosdahl |
Subject: |
Re: [Monotone-devel] revision.cc::find_least_common_ancestor bug, test and patch |
Date: |
Fri, 17 Dec 2004 08:10:12 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4 (Security Through Obscurity, linux) |
Emile Snyder <address@hidden> writes:
> I found what I believe is another very simple bug. If someone could
> look over the attached test and patch I would appreciate it.
>
> If you try to do 'monotone diff ID1 ID2' where ID2 is a direct
> descendant of ID1 with no intervening funny business, monotone
> complains 'monotone: misuse: no common ancestor for ID1 and ID2'
> (See attached test.)
>
> In revision.cc: find_least_common_ancestor (which returns a bool)
> there was no code path to return true, but there was a spot which
> logged the fact that we did in fact find a common ancestor. I just
> inserted a 'return true;' after the logging statement, and it seems
> to behave correctly.
The missing "return true" is a result of a bug in the merge/diff
algorithm; the statement is present in
b8e5eeb7a3e96bd86441e58fc9c7eee760884cbd but removed in
c853237f9d8d155431f88aca12932d2cdaaa31fe. It's maybe the same bug as
the one t_merge_1.at is reproducing, but I've made a t_merge_2.at with
this error just in case. Available via netsync at joel.rosdahl.net
(collection: net.venge.monotone, server key:
http://joel.rosdahl.net/monotone.key).
Joel
--
Joel Rosdahl <address@hidden>
Key BB845E97; fingerprint 9F4B D780 6EF4 5700 778D 8B22 0064 F9FF BB84 5E97