# # patch "ChangeLog" # from [24dc718d6d54e41ef20f353e9ce1a66aa4c81db0] # to [1ca0c140585eb24f3192496cb9194d1cde27c84b] # # patch "commands.cc" # from [ae7291420f4fe4e1bd44c8ad89bca05e90322c43] # to [42a9854e615fff7b96075632e07cb88a6d12ae29] # # patch "tests/t_multiple_heads_msg.at" # from [99d4be761e132208fa93e1d73375656509956c69] # to [209dc3a0ecffe7258fb04712d8f92ef91d93cae5] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,13 @@ +2005-04-21 Jeremy Cowgar + + * tests/t_multiple_heads_msg.at: Now checks to ensure 'multiple head' + message does not occur on first commit (which creates a new head + but not multiple heads). + * commands.cc (CMD(commit)): renamed head_size to better described + old_head_size, now checks that old_head_size is larger than 0 as + well otherwise, on commit of a brand new project, a new head was + detected and a divergence message was displayed. + 2005-04-21 Richard Levitte * commands.cc (ALIAS): refactor so you don't have to repeat all @@ -3229,7 +3239,7 @@ * AUTHORS: Mention Wojciech and Neil. * revision.cc (calculate_ancestors_from_graph): Make non-recursive. -2005-01-17 Wojciech Miłkowski +2005-01-17 Wojciech MiÅ‚kowski * std_hooks.lua: Teach about meld. --- commands.cc +++ commands.cc @@ -2631,7 +2631,7 @@ set heads; get_branch_heads(app.branch_name(), app, heads); - unsigned int head_size = heads.size(); + unsigned int old_head_size = heads.size(); guess_branch(edge_old_revision(rs.edges.begin()), app, branchname); @@ -2767,7 +2767,7 @@ blank_user_log(); get_branch_heads(app.branch_name(), app, heads); - if (heads.size() > head_size) { + if (heads.size() > old_head_size && old_head_size > 0) { P(F("note: this revision creates divergence\n" "note: you may (or may not) wish to run 'monotone merge'")); } --- tests/t_multiple_heads_msg.at +++ tests/t_multiple_heads_msg.at @@ -14,7 +14,8 @@ ]) AT_CHECK(MONOTONE add f, [], [ignore], [ignore]) -AT_CHECK(MONOTONE --branch=branch1 commit --message blah-blah, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --branch=branch1 commit --message blah-blah, [], [ignore], [stderr]) +AT_CHECK(grep -qv 'has multiple heads' stderr, []) ROOT_R_SHA=`BASE_REVISION` AT_CHECK(MONOTONE --branch=branch1 heads, [], [stdout], [ignore])