# # # patch "ChangeLog" # from [706beafb07c4efbfc3de9f118f06f4fb6f4d43f4] # to [c51a5ed02a06668b6ac77df9dab04b41c466bbc7] # # patch "roster_merge.cc" # from [fb79a4ff1f8320c5a38c8a9f5e162222744451bc] # to [f21aa23ed645ee27e9449bdea9e8cab454c086ca] # ============================================================ --- ChangeLog 706beafb07c4efbfc3de9f118f06f4fb6f4d43f4 +++ ChangeLog c51a5ed02a06668b6ac77df9dab04b41c466bbc7 @@ -1,5 +1,10 @@ 2006-02-13 Nathaniel Smith + * roster_merge.cc (log_conflicts): Tweak string. + Add list of tests needed. + +2006-02-13 Nathaniel Smith + * roster_merge.cc (is_clean): Simplify. (add_roster_merge_tests): * unit_tests.cc (init_unit_test_suite): ============================================================ --- roster_merge.cc fb79a4ff1f8320c5a38c8a9f5e162222744451bc +++ roster_merge.cc f21aa23ed645ee27e9449bdea9e8cab454c086ca @@ -31,7 +31,7 @@ void roster_merge_result::log_conflicts() { - L(FL("unclean mark-merge: %d name conflicts, %d content conflicts, %d attr conflicts, " + L(FL("unclean roster_merge: %d name conflicts, %d content conflicts, %d attr conflicts, " "%d orphaned node conflicts, %d rename target conflicts, %d directory loop conflicts\n") % node_name_conflicts.size() % file_content_conflicts.size() @@ -537,6 +537,41 @@ #ifdef BUILD_UNIT_TESTS #include "unit_tests.hh" +// cases for testing: +// +// lifecycle, file and dir +// alive in both +// alive in one and unborn in other (left vs. right) +// alive in one and dead in other (left vs. right) +// +// mark merge: +// same in both, same mark +// same in both, diff marks +// different, left wins with 1 mark +// different, right wins with 1 mark +// different, conflict +// for: +// node name, name and parent, file and dir +// file content +// node attr, file and dir +// +// attr lifecycle: +// seen in both -- -->mark merge cases +// live in one and unseen in other +// dead in one and unseen in other +// +// two diff nodes with same name +// directory loops +// orphans +// name collision on root dir +// +// interactions: +// in-node name conflict + possible between-node name conflict +// in-node name conflict + both possible names orphaned +// in-node name conflict + directory loop conflict +// between-node name conflict + both nodes orphaned +// between-node name conflict + both nodes cause loop + void add_roster_merge_tests(test_suite * suite) {