# # # add_file "tests/resolve_conflicts_read_all/attribute-attached_left" # content [8949cd75413899f077a0754ce68d96b4b33048c1] # # add_file "tests/resolve_conflicts_read_all/attribute-attached_right" # content [ced5d782510e336bc5df6c9a1d7b759378525861] # # add_file "tests/resolve_conflicts_read_all/attribute-detached_left" # content [e31d43e1ddb74c863d4d9eeb8544f12b219e0549] # # add_file "tests/resolve_conflicts_read_all/attribute-detached_right" # content [ac209be246a5ff7f489d7d049c3febca093773d2] # # add_file "tests/resolve_conflicts_read_all/content-attached_left" # content [3e1f34e6e1d23b1f57318aaf0e9184c265c20c3a] # # add_file "tests/resolve_conflicts_read_all/content-attached_right" # content [3e1f34e6e1d23b1f57318aaf0e9184c265c20c3a] # # add_file "tests/resolve_conflicts_read_all/content-detached_left" # content [499cf76b9eddcde96e2c13b840d68c11f11ee3d2] # # add_file "tests/resolve_conflicts_read_all/content-detached_right" # content [4b7a224cef47d45ca5333b90220822a99d125583] # # add_file "tests/resolve_conflicts_read_all/duplicate-name-multiple-name-missing-root_left" # content [b893f13447e996e6a203f4a2f0dd3f63acc57b43] # # add_file "tests/resolve_conflicts_read_all/duplicate-name-multiple-name-missing-root_right" # content [a2423bc385727e8c8976a4f2aa8cb0830079edb1] # # add_file "tests/resolve_conflicts_read_all/multiple-name-plus-directory-loop_left" # content [2b36f50e319b967cb0859e1b8e695fbea5c65dec] # # add_file "tests/resolve_conflicts_read_all/multiple-name-plus-directory-loop_right" # content [0d85d53d8fa5f4d3d278fddea04069e375b9eb5f] # # add_file "tests/resolve_conflicts_read_all/multiple-name-plus-duplicate-name_left" # content [473d32f7e1410cd25636c6d3bd9afe8f53bfaa65] # # add_file "tests/resolve_conflicts_read_all/multiple-name-plus-duplicate-name_right" # content [75e642ecd1eb6dcf47446764ed13d8c3732747de] # # add_file "tests/resolve_conflicts_read_all/multiple-name-plus-orphan_left" # content [0ba226f280c1cce7db3d69f6122e7f13afb84a69] # # add_file "tests/resolve_conflicts_read_all/multiple-name-plus-orphan_right" # content [4a9025dc4e7eb9ec744c3fa08d9d2c14d736583c] # # add_file "tests/resolve_conflicts_read_all/unrelated-projects_left" # content [011a57dfa3ced3ebc2696cc265b6d75bbf276fc7] # # add_file "tests/resolve_conflicts_read_all/unrelated-projects_right" # content [011a57dfa3ced3ebc2696cc265b6d75bbf276fc7] # # patch "roster_merge.cc" # from [118a09324229a6e5aeeaadf599909d9ce6ed6d4d] # to [da2b6d4cdb96d6d99fee5b7dbd62e42b832e0c66] # # patch "tests/resolve_conflicts_read_all/__driver__.lua" # from [6650db7ab1605dba9e988ac97579537499dcb428] # to [c8f14848057bb6eff36844cebd24aff6caed9d08] # ============================================================ --- tests/resolve_conflicts_read_all/attribute-attached_left 8949cd75413899f077a0754ce68d96b4b33048c1 +++ tests/resolve_conflicts_read_all/attribute-attached_left 8949cd75413899f077a0754ce68d96b4b33048c1 @@ -0,0 +1,7 @@ +mtn: warning: 2 conflicts with no supported resolutions. +mtn: conflict: multiple values for attribute 'attr1' on file 'foo' from revision c79cbcfb99f7a5e547815669b150dd3d9a28a598 +mtn: set to 'valueX' on left file 'foo' +mtn: set to 'valueZ' on right file 'foo' +mtn: conflict: multiple values for attribute 'attr2' on file 'foo' from revision c79cbcfb99f7a5e547815669b150dd3d9a28a598 +mtn: set to 'valueY' on left file 'foo' +mtn: deleted from right file 'foo' ============================================================ --- tests/resolve_conflicts_read_all/attribute-attached_right ced5d782510e336bc5df6c9a1d7b759378525861 +++ tests/resolve_conflicts_read_all/attribute-attached_right ced5d782510e336bc5df6c9a1d7b759378525861 @@ -0,0 +1,7 @@ +mtn: warning: 2 conflicts with no supported resolutions. +mtn: conflict: multiple values for attribute 'attr1' on file 'foo' from revision c79cbcfb99f7a5e547815669b150dd3d9a28a598 +mtn: set to 'valueZ' on left file 'foo' +mtn: set to 'valueX' on right file 'foo' +mtn: conflict: multiple values for attribute 'attr2' on file 'foo' from revision c79cbcfb99f7a5e547815669b150dd3d9a28a598 +mtn: deleted from left file 'foo' +mtn: set to 'valueY' on right file 'foo' ============================================================ --- tests/resolve_conflicts_read_all/attribute-detached_left e31d43e1ddb74c863d4d9eeb8544f12b219e0549 +++ tests/resolve_conflicts_read_all/attribute-detached_left e31d43e1ddb74c863d4d9eeb8544f12b219e0549 @@ -0,0 +1,10 @@ +mtn: warning: 3 conflicts with no supported resolutions. +mtn: conflict: multiple names for file 'foo' from revision d81bb87785fa1bbe11aed1ca6d3340d288b61b78 +mtn: renamed to 'bar' on the left +mtn: renamed to 'baz' on the right +mtn: conflict: multiple values for attribute 'attr1' on file 'foo' from revision d81bb87785fa1bbe11aed1ca6d3340d288b61b78 +mtn: set to 'valueX' on left file 'bar' +mtn: set to 'valueZ' on right file 'baz' +mtn: conflict: multiple values for attribute 'attr2' on file 'foo' from revision d81bb87785fa1bbe11aed1ca6d3340d288b61b78 +mtn: set to 'valueY' on left file 'bar' +mtn: deleted from right file 'baz' ============================================================ --- tests/resolve_conflicts_read_all/attribute-detached_right ac209be246a5ff7f489d7d049c3febca093773d2 +++ tests/resolve_conflicts_read_all/attribute-detached_right ac209be246a5ff7f489d7d049c3febca093773d2 @@ -0,0 +1,10 @@ +mtn: warning: 3 conflicts with no supported resolutions. +mtn: conflict: multiple names for file 'foo' from revision d81bb87785fa1bbe11aed1ca6d3340d288b61b78 +mtn: renamed to 'baz' on the left +mtn: renamed to 'bar' on the right +mtn: conflict: multiple values for attribute 'attr1' on file 'foo' from revision d81bb87785fa1bbe11aed1ca6d3340d288b61b78 +mtn: set to 'valueZ' on left file 'baz' +mtn: set to 'valueX' on right file 'bar' +mtn: conflict: multiple values for attribute 'attr2' on file 'foo' from revision d81bb87785fa1bbe11aed1ca6d3340d288b61b78 +mtn: deleted from left file 'baz' +mtn: set to 'valueY' on right file 'bar' ============================================================ --- tests/resolve_conflicts_read_all/content-attached_left 3e1f34e6e1d23b1f57318aaf0e9184c265c20c3a +++ tests/resolve_conflicts_read_all/content-attached_left 3e1f34e6e1d23b1f57318aaf0e9184c265c20c3a @@ -0,0 +1 @@ +mtn: content foo ============================================================ --- tests/resolve_conflicts_read_all/content-attached_right 3e1f34e6e1d23b1f57318aaf0e9184c265c20c3a +++ tests/resolve_conflicts_read_all/content-attached_right 3e1f34e6e1d23b1f57318aaf0e9184c265c20c3a @@ -0,0 +1 @@ +mtn: content foo ============================================================ --- tests/resolve_conflicts_read_all/content-detached_left 499cf76b9eddcde96e2c13b840d68c11f11ee3d2 +++ tests/resolve_conflicts_read_all/content-detached_left 499cf76b9eddcde96e2c13b840d68c11f11ee3d2 @@ -0,0 +1,5 @@ +mtn: content bar +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: multiple names for file 'foo' from revision 936159c798b9bb3f5d0f871a0dda158a844e9348 +mtn: renamed to 'bar' on the left +mtn: renamed to 'baz' on the right ============================================================ --- tests/resolve_conflicts_read_all/content-detached_right 4b7a224cef47d45ca5333b90220822a99d125583 +++ tests/resolve_conflicts_read_all/content-detached_right 4b7a224cef47d45ca5333b90220822a99d125583 @@ -0,0 +1,5 @@ +mtn: content baz +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: multiple names for file 'foo' from revision 936159c798b9bb3f5d0f871a0dda158a844e9348 +mtn: renamed to 'baz' on the left +mtn: renamed to 'bar' on the right ============================================================ --- tests/resolve_conflicts_read_all/duplicate-name-multiple-name-missing-root_left b893f13447e996e6a203f4a2f0dd3f63acc57b43 +++ tests/resolve_conflicts_read_all/duplicate-name-multiple-name-missing-root_left b893f13447e996e6a203f4a2f0dd3f63acc57b43 @@ -0,0 +1,8 @@ +mtn: duplicate_name +mtn: warning: 2 conflicts with no supported resolutions. +mtn: conflict: missing root directory +mtn: directory 'foo' pivoted to root on the left +mtn: directory 'bar' pivoted to root on the right +mtn: conflict: multiple names for directory '' from revision 5bc669f00cf90b76dd38077827565b624d823756 +mtn: renamed to 'aaa' on the left +mtn: renamed to 'bbb' on the right ============================================================ --- tests/resolve_conflicts_read_all/duplicate-name-multiple-name-missing-root_right a2423bc385727e8c8976a4f2aa8cb0830079edb1 +++ tests/resolve_conflicts_read_all/duplicate-name-multiple-name-missing-root_right a2423bc385727e8c8976a4f2aa8cb0830079edb1 @@ -0,0 +1,8 @@ +mtn: duplicate_name +mtn: warning: 2 conflicts with no supported resolutions. +mtn: conflict: missing root directory +mtn: directory 'bar' pivoted to root on the left +mtn: directory 'foo' pivoted to root on the right +mtn: conflict: multiple names for directory '' from revision 5bc669f00cf90b76dd38077827565b624d823756 +mtn: renamed to 'bbb' on the left +mtn: renamed to 'aaa' on the right ============================================================ --- tests/resolve_conflicts_read_all/multiple-name-plus-directory-loop_left 2b36f50e319b967cb0859e1b8e695fbea5c65dec +++ tests/resolve_conflicts_read_all/multiple-name-plus-directory-loop_left 2b36f50e319b967cb0859e1b8e695fbea5c65dec @@ -0,0 +1,4 @@ +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: multiple names for directory 'foo' from revision 27169065f28ccfb64678ac168b3805796bd9e5ae +mtn: renamed to 'a/foo' on the left +mtn: renamed to 'b/foo' on the right ============================================================ --- tests/resolve_conflicts_read_all/multiple-name-plus-directory-loop_right 0d85d53d8fa5f4d3d278fddea04069e375b9eb5f +++ tests/resolve_conflicts_read_all/multiple-name-plus-directory-loop_right 0d85d53d8fa5f4d3d278fddea04069e375b9eb5f @@ -0,0 +1,4 @@ +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: multiple names for directory 'foo' from revision 27169065f28ccfb64678ac168b3805796bd9e5ae +mtn: renamed to 'b/foo' on the left +mtn: renamed to 'a/foo' on the right ============================================================ --- tests/resolve_conflicts_read_all/multiple-name-plus-duplicate-name_left 473d32f7e1410cd25636c6d3bd9afe8f53bfaa65 +++ tests/resolve_conflicts_read_all/multiple-name-plus-duplicate-name_left 473d32f7e1410cd25636c6d3bd9afe8f53bfaa65 @@ -0,0 +1,4 @@ +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: multiple names for file 'foo' from revision 621e8ed86b46adcc57cd6abec90ecc41481a3e3b +mtn: renamed to 'aaa' on the left +mtn: renamed to 'bbb' on the right ============================================================ --- tests/resolve_conflicts_read_all/multiple-name-plus-duplicate-name_right 75e642ecd1eb6dcf47446764ed13d8c3732747de +++ tests/resolve_conflicts_read_all/multiple-name-plus-duplicate-name_right 75e642ecd1eb6dcf47446764ed13d8c3732747de @@ -0,0 +1,4 @@ +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: multiple names for file 'foo' from revision 621e8ed86b46adcc57cd6abec90ecc41481a3e3b +mtn: renamed to 'bbb' on the left +mtn: renamed to 'aaa' on the right ============================================================ --- tests/resolve_conflicts_read_all/multiple-name-plus-orphan_left 0ba226f280c1cce7db3d69f6122e7f13afb84a69 +++ tests/resolve_conflicts_read_all/multiple-name-plus-orphan_left 0ba226f280c1cce7db3d69f6122e7f13afb84a69 @@ -0,0 +1,4 @@ +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: multiple names for file 'foo' from revision e487f26d5c464b381743e394923b7fd44b00705e +mtn: renamed to 'a/foo' on the left +mtn: renamed to 'b/foo' on the right ============================================================ --- tests/resolve_conflicts_read_all/multiple-name-plus-orphan_right 4a9025dc4e7eb9ec744c3fa08d9d2c14d736583c +++ tests/resolve_conflicts_read_all/multiple-name-plus-orphan_right 4a9025dc4e7eb9ec744c3fa08d9d2c14d736583c @@ -0,0 +1,4 @@ +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: multiple names for file 'foo' from revision e487f26d5c464b381743e394923b7fd44b00705e +mtn: renamed to 'b/foo' on the left +mtn: renamed to 'a/foo' on the right ============================================================ --- tests/resolve_conflicts_read_all/unrelated-projects_left 011a57dfa3ced3ebc2696cc265b6d75bbf276fc7 +++ tests/resolve_conflicts_read_all/unrelated-projects_left 011a57dfa3ced3ebc2696cc265b6d75bbf276fc7 @@ -0,0 +1,3 @@ +mtn: duplicate_name +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: missing root directory ============================================================ --- tests/resolve_conflicts_read_all/unrelated-projects_right 011a57dfa3ced3ebc2696cc265b6d75bbf276fc7 +++ tests/resolve_conflicts_read_all/unrelated-projects_right 011a57dfa3ced3ebc2696cc265b6d75bbf276fc7 @@ -0,0 +1,3 @@ +mtn: duplicate_name +mtn: warning: 1 conflict with no supported resolutions. +mtn: conflict: missing root directory ============================================================ --- roster_merge.cc 118a09324229a6e5aeeaadf599909d9ce6ed6d4d +++ roster_merge.cc da2b6d4cdb96d6d99fee5b7dbd62e42b832e0c66 @@ -1438,6 +1438,7 @@ roster_merge_result::report_attribute_co { MM(left_roster); MM(right_roster); + MM(roster); for (size_t i = 0; i < attribute_conflicts.size(); ++i) { @@ -1454,9 +1455,11 @@ roster_merge_result::report_attribute_co } else { - node_type type = get_type(roster, conflict.nid); + // this->roster is null when we are called from 'conflicts + // show_remaining'; treat as unattached in that case. + node_type type = get_type(left_roster, conflict.nid); - if (roster.is_attached(conflict.nid)) + if (roster.all_nodes().size() > 0 && roster.is_attached(conflict.nid)) { file_path name; roster.get_name(conflict.nid, name); @@ -1692,11 +1695,15 @@ read_missing_root_conflicts(basic_io::pa { pars.sym(); - pars.esym(syms::left_type); pars.str(); - pars.esym(syms::ancestor_name); pars.str(); - pars.esym(syms::right_type); pars.str(); - pars.esym(syms::ancestor_name); pars.str(); - + if (pars.symp(syms::left_type)) + { + pars.sym(); pars.str(); + pars.esym(syms::ancestor_name); pars.str(); + pars.esym(syms::right_type); pars.str(); + pars.esym(syms::ancestor_name); pars.str(); + } + // else unrelated projects (branches); nothing else output + missing_root_conflict = true; if (pars.tok.in.lookahead != EOF) @@ -1996,25 +2003,29 @@ read_attr_state_left(basic_io::parser & static void read_attr_state_left(basic_io::parser & pars, - std::pair value) + std::pair & value) { + string tmp; + if (pars.symp(syms::left_attr_value)) { pars.sym(); value.first = true; - pars.str(); - value.second = attr_value(pars.token); + pars.str(tmp); + value.second = attr_value(tmp); } else { pars.esym(syms::left_attr_state); + pars.str(tmp); + I(tmp == "dropped"); value.first = false; } } // read_attr_state_left static void read_attr_state_right(basic_io::parser & pars, - std::pair value) + std::pair & value) { string tmp; ============================================================ --- tests/resolve_conflicts_read_all/__driver__.lua 6650db7ab1605dba9e988ac97579537499dcb428 +++ tests/resolve_conflicts_read_all/__driver__.lua c8f14848057bb6eff36844cebd24aff6caed9d08 @@ -463,7 +463,9 @@ check(indir(dir2, mtn("pivot_root", "bar check(mtn("co", "--revision", base, "--branch", branch, dir2), 0, false, false) check(indir(dir2, mtn("pivot_root", "bar", "bbb")), 0, true, true) -check_conflicts(branch) +check(indir(dir2, mtn("commit", "--message", "blah-blah", "--branch", branch .. "-propagate")), 0, false, false) +check_conflicts_left(branch) +check_conflicts_right(branch) -- unrelated projects