# # patch "ChangeLog" # from [24670bca71753156e7385d8c5faf47bc3b7809b5] # to [30223bcaf7c5f9aadcc2b006eee62a8dd63fe2f5] # # patch "commands.cc" # from [2b9bb2299e2fe0f337e33d1989d6f3f6d8c793c7] # to [f9e412756872786e2b1e29b7628331844712d796] # --- ChangeLog +++ ChangeLog @@ -1,5 +1,10 @@ 2005-06-21 Nathaniel Smith + * commands.cc (do_diff): Use calculate_arbitrary_change_set, + instead of reimplementing it. + +2005-06-21 Nathaniel Smith + * revision.cc (find_least_common_ancestor): Handle left == right case. * tests/t_diff_currev.at: Un-XFAIL. --- commands.cc +++ commands.cc @@ -2659,36 +2659,8 @@ N(find_least_common_ancestor(src_id, dst_id, anc_id, app), F("no common ancestor for %s and %s") % src_id % dst_id); - if (src_id == anc_id) - { - calculate_composite_change_set(src_id, dst_id, app, composite); - L(F("calculated diff via direct analysis\n")); - } - else if (!(src_id == anc_id) && dst_id == anc_id) - { - change_set tmp; - calculate_composite_change_set(dst_id, src_id, app, tmp); - invert_change_set(tmp, m_new, composite); - L(F("calculated diff via inverted direct analysis\n")); - } - else - { - change_set anc_to_src, src_to_anc, anc_to_dst; - manifest_id anc_m_id; - manifest_map m_anc; + calculate_arbitrary_change_set(src_id, dst_id, app, composite); - I(!(src_id == anc_id || dst_id == anc_id)); - - app.db.get_revision_manifest(anc_id, anc_m_id); - app.db.get_manifest(anc_m_id, m_anc); - - calculate_composite_change_set(anc_id, src_id, app, anc_to_src); - invert_change_set(anc_to_src, m_anc, src_to_anc); - calculate_composite_change_set(anc_id, dst_id, app, anc_to_dst); - concatenate_change_sets(src_to_anc, anc_to_dst, composite); - L(F("calculated diff via common ancestor %s\n") % anc_id); - } - if (!new_is_archived) { L(F("concatenating un-committed changeset to composite\n"));