[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone.issue-209: 23435fa4cb449a546
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone.issue-209: 23435fa4cb449a54601998a3ac8cb989ec6668c6 |
Date: |
Mon, 23 Jul 2012 11:01:09 +0200 (CEST) |
revision: 23435fa4cb449a54601998a3ac8cb989ec6668c6
date: 2012-07-21T18:34:44
author: address@hidden
branch: net.venge.monotone.issue-209
changelog:
resolve_conflicts_dropped_modified: more tests passing, still needs work
* src/cmd_conflicts.cc (set_resolution): user simpler
resolve_conflicts::file_path_external. fix left/right bug in single
resolutions. fix rename bug
* src/merge_conflict.cc (read_dropped_modified_conflict): fix bugs
(create_new_node, replace_content): add side_image, improve messages
(resolve_dropped_modified_one): improve messages, fix bugs
(resolve_dropped_modified_conflicts): fix bugs
* src/merge_roster.hh (dropped_modified_conflict): fix comment
* src/roster.cc (check_sane): add comment
* test/func/resolve_conflicts_dropped_modified_1: renamed
*
test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/__driver__.lua:
add merge with left, right reversed
*
test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/conflicts_2_3:
New file.
*
test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/conflicts_2_3_resolved:
New file.
manifest:
format_version "1"
new_manifest [86df220d3b1164c4119fbdcdc95a1948b6f682d9]
old_revision [d6fdf316792e79267f9594e6761852b4ef6a9a6e]
rename "test/func/resolve_conflicts_dropped_modified"
to "test/func/resolve_conflicts_dropped_modified_1"
add_file
"test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/conflicts_2_3"
content [1f257fa6e99abf93229af189109b9efe3cfae88f]
add_file
"test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/conflicts_2_3_resolved"
content [d8b9a96fdaf210a4d1bc495c62c3dcf40114d39e]
patch "src/cmd_conflicts.cc"
from [21bfaa34a4c999f8214b8a2619cbbf82986f9158]
to [dc33213407b40ba4981d011ba0b80cb88f8c6627]
patch "src/merge_conflict.cc"
from [9b89912a0ccd71b9d77d5978ddf1b8bb89368b28]
to [9eaf4ac857852fa7bd65251c9202aff97b5b91d6]
patch "src/merge_roster.hh"
from [d214f006b7f4f1e3161313c39f3aac706372ccc5]
to [c782f7684e380f4583ed7ea88b0b2967f89d1d23]
patch "src/roster.cc"
from [3f81121ce80b42565e6e5e4bbe3e6186b85e9b10]
to [82bdb78ac2f38369f5972510e6ca5bcc3d0cdec5]
patch "test/func/resolve_conflicts_dropped_modified_1/__driver__.lua"
from [e4f973e6cb8e3494c4b498f68f7cd4b2a6d20fa6]
to [0bbd4c665fb269d56291f256f3480ff74ea7a3d5]
patch "test/func/resolve_conflicts_dropped_modified_1/conflicts-recreated"
from [26f633aeeee82440eea41f8e1747f2c4262ce9bb]
to [826d98ed030373bb9b0b778c1a1da792b8f4009a]
patch
"test/func/resolve_conflicts_dropped_modified_1/conflicts-recreated-resolved"
from [5082532e55e68bc93610d1e8936fe790bb048d3d]
to [096988d5f8102507e0e2783f7a6954512a167da5]
patch "test/func/resolve_conflicts_dropped_modified_1/conflicts-resolved"
from [dd892da237ef4f3a0ee30fa3989374a65d092d68]
to [b2fe24f2d19a8d539c0c89c305a7b58a36ead63e]
patch
"test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/__driver__.lua"
from [b3dfb58300c6e9e6762b9132c33e910e05901c29]
to [f1d2d4f0ba195e43ee31e57f42a9396971656833]
============================================================
--- src/cmd_conflicts.cc 21bfaa34a4c999f8214b8a2619cbbf82986f9158
+++ src/cmd_conflicts.cc dc33213407b40ba4981d011ba0b80cb88f8c6627
@@ -399,7 +399,7 @@ set_resolution(resolve_conflicts::file_r
{
E(args.size() == 2, origin::user, F("wrong number of arguments"));
resolution.resolution = resolve_conflicts::rename;
- resolution.rename = file_path_external(utf8(idx(args,1)(), origin::user));
+ resolution.rename = file_path_external(idx(args,1));
}
else if ("user" == idx(args, 0)())
{
@@ -420,7 +420,7 @@ set_resolution(resolve_conflicts::file_r
resolution.resolution = resolve_conflicts::content_user_rename;
resolution.content = new_optimal_path(idx(args,1)(), false);
- resolution.rename = file_path_external(utf8(idx(args,2)(), origin::user));
+ resolution.rename = file_path_external(idx(args,2));
}
else
E(false, origin::user,
@@ -557,43 +557,44 @@ set_first_conflict(database & db,
E(conflict.left_nid == the_null_node, origin::user,
F("must specify 'resolve_first_left' or 'resolve_first_right' (not just 'resolve_first')"));
- if (conflict.left_resolution.resolution == resolve_conflicts::none)
+ // the left side stays dropped; we either drop, keep or replace the right side
+ if (conflict.right_resolution.resolution == resolve_conflicts::none)
{
if ("drop" == idx(args,0)())
{
E(args.size() == 1, origin::user, F("wrong number of arguments"));
- conflict.left_resolution.resolution = resolve_conflicts::drop;
+ conflict.right_resolution.resolution = resolve_conflicts::drop;
}
else if ("keep" == idx(args,0)())
{
- E(args.size() == 1, origin::user, F("wrong number of arguments"));
- E(!conflict.orphaned, origin::user, F("orphaned files must be renamed"));
+ E(args.size() == 1, origin::user, F("wrong number of arguments"));
+ E(!conflict.orphaned, origin::user, F("orphaned files must be renamed"));
- conflict.left_resolution.resolution = resolve_conflicts::keep;
+ conflict.right_resolution.resolution = resolve_conflicts::keep;
}
else if ("user" == idx(args,0)())
{
E(args.size() == 2, origin::user, F("wrong number of arguments"));
E(!conflict.orphaned, origin::user, F("orphaned files must be renamed"));
- conflict.left_resolution.resolution = resolve_conflicts::content_user;
- conflict.left_resolution.content = new_optimal_path(idx(args,1)(), false);
+ conflict.right_resolution.resolution = resolve_conflicts::content_user;
+ conflict.right_resolution.content = new_optimal_path(idx(args,1)(), false);
}
else if ("rename" == idx(args,0)())
{
E(args.size() == 2, origin::user, F("wrong number of arguments"));
- conflict.left_resolution.resolution = resolve_conflicts::rename;
- conflict.left_resolution.content = new_optimal_path(idx(args,1)(), false);
+ conflict.right_resolution.resolution = resolve_conflicts::rename;
+ conflict.right_resolution.rename = file_path_external(idx(args,1));
}
else if ("user_rename" == idx(args,0)())
{
E(args.size() == 3, origin::user, F("wrong number of arguments"));
- conflict.left_resolution.resolution = resolve_conflicts::content_user_rename;
- conflict.left_resolution.content = new_optimal_path(idx(args,1)(), false);
- conflict.left_resolution.rename = file_path_external(utf8(idx(args,2)(), origin::user));
+ conflict.right_resolution.resolution = resolve_conflicts::content_user_rename;
+ conflict.right_resolution.content = new_optimal_path(idx(args,1)(), false);
+ conflict.right_resolution.rename = file_path_external(idx(args,2));
}
else
{
@@ -608,43 +609,44 @@ set_first_conflict(database & db,
E(conflict.right_nid == the_null_node, origin::user,
F("must specify 'resolve_first_left' or 'resolve_first_right' (not just 'resolve_first')"));
- if (conflict.right_resolution.resolution == resolve_conflicts::none)
+ // the right side stays dropped; we either drop, keep or replace the left side
+ if (conflict.left_resolution.resolution == resolve_conflicts::none)
{
if ("drop" == idx(args,0)())
{
E(args.size() == 1, origin::user, F("wrong number of arguments"));
- conflict.right_resolution.resolution = resolve_conflicts::drop;
+ conflict.left_resolution.resolution = resolve_conflicts::drop;
}
else if ("keep" == idx(args,0)())
{
E(args.size() == 1, origin::user, F("wrong number of arguments"));
E(!conflict.orphaned, origin::user, F("orphaned files must be renamed"));
- conflict.right_resolution.resolution = resolve_conflicts::keep;
+ conflict.left_resolution.resolution = resolve_conflicts::keep;
}
else if ("user" == idx(args,0)())
{
E(args.size() == 2, origin::user, F("wrong number of arguments"));
E(!conflict.orphaned, origin::user, F("orphaned files must be renamed"));
- conflict.right_resolution.resolution = resolve_conflicts::content_user;
- conflict.right_resolution.content = new_optimal_path(idx(args,1)(), false);
+ conflict.left_resolution.resolution = resolve_conflicts::content_user;
+ conflict.left_resolution.content = new_optimal_path(idx(args,1)(), false);
}
else if ("rename" == idx(args,0)())
{
E(args.size() == 2, origin::user, F("wrong number of arguments"));
- conflict.right_resolution.resolution = resolve_conflicts::rename;
- conflict.right_resolution.content = new_optimal_path(idx(args,1)(), false);
+ conflict.left_resolution.resolution = resolve_conflicts::rename;
+ conflict.left_resolution.rename = file_path_external(idx(args,1));
}
else if ("user_rename" == idx(args,0)())
{
E(args.size() == 3, origin::user, F("wrong number of arguments"));
- conflict.right_resolution.resolution = resolve_conflicts::content_user_rename;
- conflict.right_resolution.content = new_optimal_path(idx(args,1)(), false);
- conflict.right_resolution.rename = file_path_external(utf8(idx(args,2)(), origin::user));
+ conflict.left_resolution.resolution = resolve_conflicts::content_user_rename;
+ conflict.left_resolution.content = new_optimal_path(idx(args,1)(), false);
+ conflict.left_resolution.rename = file_path_external(idx(args,2));
}
else
{
============================================================
--- src/merge_conflict.cc 9b89912a0ccd71b9d77d5978ddf1b8bb89368b28
+++ src/merge_conflict.cc 9eaf4ac857852fa7bd65251c9202aff97b5b91d6
@@ -2067,7 +2067,6 @@ read_dropped_modified_conflict(basic_io:
}
else if (tmp == "modified file")
{
- conflict.dropped_side = resolve_conflicts::right_side;
conflict.right_rid = right_rid;
pars.esym(syms::right_name); pars.str(tmp);
@@ -2141,7 +2140,7 @@ read_dropped_modified_conflict(basic_io:
else
conflict.right_resolution.resolution = resolve_conflicts::content_user;
pars.sym();
- conflict.left_resolution.content = new_optimal_path(pars.token, false);
+ conflict.right_resolution.content = new_optimal_path(pars.token, false);
pars.str();
}
else
@@ -2846,6 +2845,7 @@ create_new_node(roster_t const &
static node_id
create_new_node(roster_t const & parent_roster,
+ string const & side_image,
node_id const & parent_nid,
roster_t & result_roster,
boost::shared_ptr<any_path> new_content,
@@ -2859,10 +2859,10 @@ create_new_node(roster_t const &
parent_roster.get_file_details(parent_nid, parent_fid, parent_name);
adaptor.get_version(parent_fid, parent_data);
- P(F("replacing content of '%s' with '%s'") % parent_name % new_content->as_external());
+ P(F("replacing content of '%s' from %s with '%s'") % parent_name % side_image % new_content->as_external());
// FIXME: factor out 'history lost' msg
- P(F("history for '%s' will be lost; see user manual Merge Conflicts section") % parent_name);
+ P(F("history for '%s' from %s will be lost; see user manual Merge Conflicts section") % parent_name % side_image);
data result_raw_data;
read_data(*new_content, result_raw_data);
@@ -2882,6 +2882,7 @@ replace_content(roster_t const &
static void
replace_content(roster_t const & parent_roster,
+ string const & side_image,
node_id const & nid,
roster_t & result_roster,
boost::shared_ptr<any_path> new_content,
@@ -2892,7 +2893,7 @@ replace_content(roster_t const &
parent_roster.get_file_details(nid, parent_fid, parent_name);
- P(F("replacing content of '%s' with '%s'") % parent_name % new_content->as_external());
+ P(F("replacing content of '%s' from %s with '%s'") % parent_name % side_image % new_content->as_external());
file_data parent_data;
adaptor.get_version(parent_fid, parent_data);
@@ -2937,6 +2938,8 @@ resolve_dropped_modified_one(lua_hooks &
else
{
E(resolution.resolution != resolve_conflicts::none, origin::user,
+ (other_resolution.resolution == resolve_conflicts::none) ?
+ F("no resolution provided for dropped_modified '%s'") % name :
F("no %s_resolution provided for dropped_modified '%s'") % side_image % name);
}
@@ -2951,7 +2954,7 @@ resolve_dropped_modified_one(lua_hooks &
if (handling_dropped_side)
{
// recreated; replace the contents of the recreated node
- replace_content(side_roster, nid, result_roster, resolution.content, adaptor);
+ replace_content(side_roster, side_image, nid, result_roster, resolution.content, adaptor);
}
else
{
@@ -2959,7 +2962,8 @@ resolve_dropped_modified_one(lua_hooks &
// See comments in keep below on why we drop first
result_roster.drop_detached_node(nid);
- node_id new_nid = create_new_node (side_roster, nid, result_roster, resolution.content, adaptor, nis);
+ node_id new_nid = create_new_node
+ (side_roster, side_image, nid, result_roster, resolution.content, adaptor, nis);
attach_node(lua, result_roster, new_nid, name);
}
@@ -2972,7 +2976,7 @@ resolve_dropped_modified_one(lua_hooks &
case resolve_conflicts::drop:
// The node is either modified, recreated or duplicate name; in
// any case, it is present in the result roster, so drop it
- P(F("dropping '%s'") % name);
+ P(F("dropping '%s' from %s") % name % side_image);
result_roster.drop_detached_node(nid);
break;
@@ -2980,16 +2984,16 @@ resolve_dropped_modified_one(lua_hooks &
if (handling_dropped_side)
{
// recreated; keep the recreated contents
- P(F("keeping '%s'") % name);
+ P(F("keeping '%s' from %s") % name % side_image);
attach_node(lua, result_roster, nid, name);
}
else
{
// modified; keep the modified contents
- P(F("keeping '%s'") % name);
- P(F("history for '%s' will be lost; see user manual Merge Conflicts section") %
- name);
+ P(F("keeping '%s' from %s") % name % side_image);
+ P(F("history for '%s' from %s will be lost; see user manual Merge Conflicts section") %
+ name % side_image);
// We'd like to just attach_node here, but that violates a
// fundamental design principle of mtn; nodes are born once,
@@ -3010,7 +3014,7 @@ resolve_dropped_modified_one(lua_hooks &
if (handling_dropped_side)
{
// recreated; rename the recreated contents
- P(F("renaming '%s' to '%s'") % name % resolution.rename.as_external());
+ P(F("renaming '%s' from %s to '%s'") % name % side_image % resolution.rename.as_external());
attach_node(lua, result_roster, nid, resolution.rename);
}
else
@@ -3019,8 +3023,8 @@ resolve_dropped_modified_one(lua_hooks &
// See comment in keep above on why we drop first.
result_roster.drop_detached_node(nid);
- P(F("renaming '%s' to '%s'") % name % resolution.rename.as_external());
- P(F("history for '%s' will be lost; see user manual Merge Conflicts section") % name);
+ P(F("renaming '%s' from %s to '%s'") % name % side_image % resolution.rename.as_external());
+ P(F("history for '%s' from %s will be lost; see user manual Merge Conflicts section") % name % side_image);
node_id new_nid = result_roster.create_file_node(fid, nis);
attach_node (lua, result_roster, new_nid, resolution.rename);
@@ -3031,21 +3035,23 @@ resolve_dropped_modified_one(lua_hooks &
if (handling_dropped_side)
{
// recreated; rename and replace the recreated contents
- replace_content(side_roster, nid, result_roster, resolution.content, adaptor);
+ replace_content(side_roster, side_image, nid, result_roster, resolution.content, adaptor);
- P(F("renaming '%s' to '%s'") % name % resolution.rename.as_external());
+ P(F("renaming '%s' from %s to '%s'") % name % side_image % resolution.rename.as_external());
attach_node (lua, result_roster, nid, resolution.rename);
}
else
{
- // modified; drop, rename and replace the modified contents
- node_id nid = create_new_node
- (side_roster, nid, result_roster, resolution.content, adaptor, nis);
+ // modified; drop, rename and replace the modified contents
+ result_roster.drop_detached_node(nid);
- P(F("renaming '%s' to '%s'") % name % resolution.rename.as_external());
+ node_id new_nid = create_new_node
+ (side_roster, side_image, nid, result_roster, resolution.content, adaptor, nis);
- attach_node(lua, result_roster, nid, resolution.rename);
+ P(F("renaming '%s' from %s to '%s'") % name % side_image % resolution.rename.as_external());
+
+ attach_node(lua, result_roster, new_nid, resolution.rename);
}
break;
}
@@ -3074,29 +3080,33 @@ roster_merge_result::resolve_dropped_mod
file_path right_name;
file_id right_fid;
- if (null_id(conflict.left_rid))
+ if (conflict.left_nid != the_null_node)
{
- if (conflict.left_nid != the_null_node)
- left_roster.get_file_details(conflict.left_nid, left_fid, left_name);
+ if (conflict.left_rid == adaptor.left_rid)
+ {
+ left_roster.get_file_details(conflict.left_nid, left_fid, left_name);
+ }
+ else
+ {
+ roster_t tmp;
+ adaptor.db.get_roster(conflict.left_rid, tmp);
+ tmp.get_file_details(conflict.left_nid, left_fid, left_name);
+ }
}
- else
- {
- roster_t tmp;
- adaptor.db.get_roster(conflict.left_rid, tmp);
- tmp.get_file_details(conflict.left_nid, left_fid, left_name);
- }
- if (null_id (conflict.right_rid))
+ if (conflict.right_nid != the_null_node)
{
- if (conflict.right_nid != the_null_node)
- right_roster.get_file_details(conflict.right_nid, right_fid, right_name);
+ if (conflict.right_rid == adaptor.right_rid)
+ {
+ right_roster.get_file_details(conflict.right_nid, right_fid, right_name);
+ }
+ else
+ {
+ roster_t tmp;
+ adaptor.db.get_roster(conflict.right_rid, tmp);
+ tmp.get_file_details(conflict.right_nid, right_fid, right_name);
+ }
}
- else
- {
- roster_t tmp;
- adaptor.db.get_roster(conflict.right_rid, tmp);
- tmp.get_file_details(conflict.right_nid, right_fid, right_name);
- }
resolve_dropped_modified_one (lua,
string("left"),
============================================================
--- src/merge_roster.hh d214f006b7f4f1e3161313c39f3aac706372ccc5
+++ src/merge_roster.hh c782f7684e380f4583ed7ea88b0b2967f89d1d23
@@ -139,8 +139,6 @@ struct dropped_modified_conflict
bool orphaned; // if true, the dropped side is due to a dropped parent directory
- // read_dropped_modified sets rid when corresponding nid is non-null and
- // not in the corresponding parent roster
revision_id left_rid, right_rid;
resolve_conflicts::file_resolution_t left_resolution, right_resolution;
============================================================
--- src/roster.cc 3f81121ce80b42565e6e5e4bbe3e6186b85e9b10
+++ src/roster.cc 82bdb78ac2f38369f5972510e6ca5bcc3d0cdec5
@@ -1235,7 +1235,7 @@ roster_t::check_sane(bool temp_nodes_ok)
I(n == get_node(nid));
I(maxdepth-- > 0);
}
- I(maxdepth == 0);
+ I(maxdepth == 0); // if fails, some node is not attached
}
void
============================================================
--- test/func/resolve_conflicts_dropped_modified/__driver__.lua e4f973e6cb8e3494c4b498f68f7cd4b2a6d20fa6
+++ test/func/resolve_conflicts_dropped_modified_1/__driver__.lua 0bbd4c665fb269d56291f256f3480ff74ea7a3d5
@@ -3,23 +3,51 @@
-- other resolve_conflicts_dropped_modified_* tests validate resolving
-- in extended use cases.
+-- Parent nodes can be in several states: dropped, modified,
+-- recreated. Modified nodes can also be renamed, but that is
+-- orthogonal to resolutions; the parent name is used to detect
+-- recreate or duplicate name, and to name the result node if no
+-- rename resolution is specified. Dropped files can also be orphaned,
+-- but that just restricts the allowed resolutions (no keep).
+--
+-- We need to test all combinations of left/right, parent node state,
+-- and resolution:
+--
+-- state resolution left file right file
+-- dropped drop file_3 etc file_2 etc
+-- keep (not supported)
+-- rename (not supported)
+-- user (not supported)
+-- user_rename (not supported)
+--
+-- modified drop file_2 file_3 etc
+-- keep file_4 file_5
+-- rename file_9
+-- user file_6 file_7
+-- user_rename file_10
+--
+-- recreated drop file_12
+-- keep file_12
+-- rename
+-- user file_13
+-- user_rename
+--
+-- There are also other tests for the restrictions imposed by orphan etc.
+
mtn_setup()
--- Create conflicts; modify and rename file in one head, drop in
--- other.
+-- Create conflicts with single resolutions; modify and/or rename file in
+-- one parent, drop in the other.
--
--- Six conflicts to test the three possible resolutions, with drop on
--- both left and right. Number in file name is the node number (helps
--- in debugging; node 1 is the root directory).
---
--- The case of a modified file in a dropped directory is tested below.
+-- Six conflicts to test three possible resolutions, with drop on
+-- both left and right.
-addfile("file_2", "file_2 base") -- modify/rename left, drop right; drop
-addfile("file_3", "file_3 base") -- drop left, modify/rename right; drop
-addfile("file_4", "file_4 base") -- modify left; modify, rename, and drop right; keep
-addfile("file_5", "file_5 base") -- modify, rename, and drop left; modify right; keep
-addfile("file_6", "file_6 base") -- modify/rename left, drop right; user
-addfile("file_7", "file_7 base") -- drop left, modify/rename right; user
+addfile("file_2", "file_2 base") -- modify/rename left: drop right: drop left, drop right
+addfile("file_3", "file_3 base") -- drop left; modify/rename right: drop left, drop right
+addfile("file_4", "file_4 base") -- modify left; modify, rename, and drop right; keep left, drop right
+addfile("file_5", "file_5 base") -- modify, rename, and drop left; modify right; drop left, keep right
+addfile("file_6", "file_6 base") -- modify/rename left, drop right; user left, drop right
+addfile("file_7", "file_7 base") -- drop left, modify/rename right; drop left, user right
commit("testbranch", "base")
base = base_revision()
@@ -92,6 +120,8 @@ check(samelines("stderr",
"mtn: dropped on the right",
"mtn: possible resolutions:",
"mtn: resolve_first drop",
+ "mtn: resolve_first rename",
+ "mtn: resolve_first user_rename \"new_content_name\" \"new_file_name\"",
"mtn: resolve_first keep",
"mtn: resolve_first user \"name\""}))
@@ -100,7 +130,7 @@ check(mtn("explicit_merge", "--resolve-c
-- check for nice error message if not all dropped_modified conflicts are resolved
-- we have to use explicit_merge to get left/right to match 'conflicts store'
check(mtn("explicit_merge", "--resolve-conflicts", left_1, right_1, "testbranch"), 1, nil, true)
-check(qgrep("no resolution provided for", "stderr"))
+check(qgrep("no resolution provided for dropped_modified 'file_3_renamed'", "stderr"))
check(mtn("conflicts", "show_first"), 0, nil, true)
check(samelines("stderr",
@@ -109,6 +139,8 @@ check(samelines("stderr",
"mtn: modified on the right",
"mtn: possible resolutions:",
"mtn: resolve_first drop",
+ "mtn: resolve_first rename",
+ "mtn: resolve_first user_rename \"new_content_name\" \"new_file_name\"",
"mtn: resolve_first keep",
"mtn: resolve_first user \"name\""}))
@@ -121,6 +153,8 @@ check(samelines("stderr",
"mtn: dropped on the right",
"mtn: possible resolutions:",
"mtn: resolve_first drop",
+ "mtn: resolve_first rename",
+ "mtn: resolve_first user_rename \"new_content_name\" \"new_file_name\"",
"mtn: resolve_first keep",
"mtn: resolve_first user \"name\""}))
@@ -133,6 +167,8 @@ check(samelines("stderr",
"mtn: modified on the right",
"mtn: possible resolutions:",
"mtn: resolve_first drop",
+ "mtn: resolve_first rename",
+ "mtn: resolve_first user_rename \"new_content_name\" \"new_file_name\"",
"mtn: resolve_first keep",
"mtn: resolve_first user \"name\""}))
@@ -145,6 +181,8 @@ check(samelines("stderr",
"mtn: dropped on the right",
"mtn: possible resolutions:",
"mtn: resolve_first drop",
+ "mtn: resolve_first rename",
+ "mtn: resolve_first user_rename \"new_content_name\" \"new_file_name\"",
"mtn: resolve_first keep",
"mtn: resolve_first user \"name\""}))
@@ -159,10 +197,11 @@ check(samelines("stderr",
"mtn: modified on the right",
"mtn: possible resolutions:",
"mtn: resolve_first drop",
+ "mtn: resolve_first rename",
+ "mtn: resolve_first user_rename \"new_content_name\" \"new_file_name\"",
"mtn: resolve_first keep",
"mtn: resolve_first user \"name\""}))
-mkdir("_MTN/resolutions")
writefile("_MTN/resolutions/file_7_resolved", "file_7 resolved")
check(mtn("conflicts", "resolve_first", "user", "_MTN/resolutions/file_7_resolved"), 0, nil, true)
@@ -171,16 +210,23 @@ check(mtn("explicit_merge", "--resolve-c
-- we have to use explicit_merge to get left/right to match 'conflicts store'
check(mtn("explicit_merge", "--resolve-conflicts", left_1, right_1, "testbranch"), 0, nil, true)
-check(qgrep("dropping 'file_2_renamed'", "stderr"))
-check(qgrep("dropping 'file_3_renamed'", "stderr"))
-check(qgrep("keeping 'file_4'", "stderr"))
-check(qgrep("keeping 'file_5'", "stderr"))
-check(qgrep("replacing content of 'file_6_renamed' with '_MTN/resolutions/file_6_resolved", "stderr"))
-check(qgrep("replacing content of 'file_7_renamed' with '_MTN/resolutions/file_7_resolved", "stderr"))
-check(not qgrep("warning", "stderr"))
+check(samelines("stderr",
+{"mtn: [left] 7b2ef4343b0717bcd122498a1a0b7ff7acffb64c",
+ "mtn: [right] ca7922b510f9daf5c4b28c6788315ee82eb9a7f0",
+ "mtn: dropping 'file_2_renamed' from left",
+ "mtn: dropping 'file_3_renamed' from right",
+ "mtn: keeping 'file_4' from left",
+ "mtn: history for 'file_4' from left will be lost; see user manual Merge Conflicts section",
+ "mtn: keeping 'file_5' from right",
+ "mtn: history for 'file_5' from right will be lost; see user manual Merge Conflicts section",
+ "mtn: replacing content of 'file_6_renamed' from left with '_MTN/resolutions/file_6_resolved'",
+ "mtn: history for 'file_6_renamed' from left will be lost; see user manual Merge Conflicts section",
+ "mtn: replacing content of 'file_7_renamed' from right with '_MTN/resolutions/file_7_resolved'",
+ "mtn: history for 'file_7_renamed' from right will be lost; see user manual Merge Conflicts section",
+ "mtn: [merged] 57bf835ef0434411189dc3eca1650a6bba513c14"}))
-- If a file is renamed (without other change) and dropped,
--- the change is ignored:
+-- the rename is ignored:
addfile("file_8", "file_8 base") -- rename left, drop right
commit("testbranch", "base 2")
@@ -208,13 +254,13 @@ check(qgrep("0 conflicts", "stderr"))
-- make sense). This used to be the test
-- "(imp)_merge((patch_foo_a),_(delete_foo_))"
--
--- We create three potential conflicts; one ignored, three with different resolutions:
+-- We create four potential conflicts; one ignored, three with different resolutions:
-adddir("dir1") -- empty, dropped and renamed (not a conflict; just dropped)
-mkdir("dir2") -- not empty, dropped, contents modified
-addfile("dir2/file_9", "file_9 base") -- resolved by rename
-addfile("dir2/file_10", "file_10 base") -- resolved by user_rename
-addfile("dir2/file_11", "file_11 base") -- resolved by drop
+adddir("dir1") -- empty - drop left; rename right (not a conflict; just dropped)
+mkdir("dir2") -- not empty - modified left; drop right
+addfile("dir2/file_9", "file_9 base") -- resolution: rename left, drop right
+addfile("dir2/file_10", "file_10 base") -- resolution: user_rename left, drop right
+addfile("dir2/file_11", "file_11 base") -- resolution: drop left, drop right
commit("testbranch", "base 3")
base_3 = base_revision()
@@ -270,97 +316,109 @@ check(samelines("stderr",
check(samelines("stderr",
{"mtn: [left] 4228fbd8003cdd89e7eea51fcef10c3f91d78f69",
"mtn: [right] 6cb6438a490a1ad4c69ff6cac23c75a903cd9cfd",
- "mtn: replacing content of 'dir2/file_10' (renamed to 'file_10') with '_MTN/resolutions/file_10'",
- "mtn: history for 'dir2/file_10' will be lost; see user manual Merge Conflicts section",
- "mtn: dropping 'dir2/file_11'",
- "mtn: renaming 'dir2/file_9' to 'file_9'",
- "mtn: history for 'dir2/file_9' will be lost; see user manual Merge Conflicts section",
+ "mtn: replacing content of 'dir2/file_10' from left with '_MTN/resolutions/file_10'",
+ "mtn: history for 'dir2/file_10' from left will be lost; see user manual Merge Conflicts section",
+ "mtn: renaming 'dir2/file_10' from left to 'file_10'",
+ "mtn: dropping 'dir2/file_11' from left",
+ "mtn: renaming 'dir2/file_9' from left to 'file_9'",
+ "mtn: history for 'dir2/file_9' from left will be lost; see user manual Merge Conflicts section",
"mtn: [merged] 5cafe5405ed31c81f9061be62e38f25aeaaea9c5"}))
-
--- A special case; drop then re-add vs modify. This used to be the test
+
+check(mtn("update"), 0, nil, true)
+
+-- Test recreated; drop then re-add vs modify. This used to be the test
-- "merge((patch_a),_(drop_a,_add_a))"
-addfile("file_10", "file_10 base") -- modify in left; drop, add in right
-addfile("file_11", "file_11 base") -- drop, add in left; modify in right
+addfile("file_12", "file_12 base") -- modify in left; drop, add in right: keep left, drop right
+addfile("file_13", "file_13 base") -- drop, add in left; modify in right: user left, drop right
commit("testbranch", "base 4")
base_4 = base_revision()
-writefile("file_10", "file_10 left")
+writefile("file_12", "file_12 left")
-check(mtn("drop", "file_11"), 0, false, false)
+check(mtn("drop", "file_13"), 0, false, false)
commit("testbranch", "left 4a")
-addfile("file_11", "file_11 left re-add")
+addfile("file_13", "file_13 left re-add")
commit("testbranch", "left 4b")
left_4 = base_revision()
revert_to(base_4)
-check(mtn("drop", "file_10"), 0, false, false)
-writefile("file_11", "file_11 right")
+check(mtn("drop", "file_12"), 0, false, false)
+writefile("file_13", "file_13 right")
commit("testbranch", "right 4a")
-addfile("file_10", "file_10 right re-add")
+addfile("file_12", "file_12 right re-add")
commit("testbranch", "right 4b")
right_4 = base_revision()
check(mtn("show_conflicts", left_4, right_4), 0, nil, true)
check(samelines("stderr",
-{"mtn: [left] 9485fe891d5e23d6dc30140228cd02840ee719e9",
- "mtn: [right] 9a8192d3bf263cbd5782791e823b837d42af6902",
- "mtn: [ancestor] 209e4118bda3960b2f83e48b2368e981ab748ee5",
- "mtn: conflict: file 'file_10' from revision 209e4118bda3960b2f83e48b2368e981ab748ee5",
- "mtn: modified on the left, named file_10",
+{"mtn: [left] 0745f9674d3e615b29cdb30ffe6e3c6a1db55915",
+ "mtn: [right] 682e750ea71b77bcbbcdf33b6fc7cfa0516766f8",
+ "mtn: [ancestor] c8bb2e0efd5e055beea0299c9beecffece46cb4a",
+ "mtn: conflict: file 'file_12' from revision c8bb2e0efd5e055beea0299c9beecffece46cb4a",
+ "mtn: modified on the left, named file_12",
"mtn: dropped and recreated on the right",
- "mtn: conflict: file 'file_11' from revision 209e4118bda3960b2f83e48b2368e981ab748ee5",
+ "mtn: conflict: file 'file_13' from revision c8bb2e0efd5e055beea0299c9beecffece46cb4a",
"mtn: dropped and recreated on the left",
- "mtn: modified on the right, named file_11",
+ "mtn: modified on the right, named file_13",
"mtn: 2 conflicts with supported resolutions."}))
check(mtn("conflicts", "store", left_4, right_4), 0, nil, true)
check(samefilestd("conflicts-recreated", "_MTN/conflicts"))
--- drop is not a valid resolution in this case
check(mtn("conflicts", "show_first"), 0, nil, true)
check(samelines("stderr",
-{"mtn: conflict: file 'file_10'",
+{"mtn: conflict: file 'file_12'",
"mtn: modified on the left",
"mtn: dropped and recreated on the right",
"mtn: possible resolutions:",
- "mtn: resolve_first keep",
- "mtn: resolve_first user \"name\""}))
+ "mtn: resolve_first_left drop",
+ "mtn: resolve_first_left rename",
+ "mtn: resolve_first_left user_rename \"new_content_name\" \"new_file_name\"",
+ "mtn: resolve_first_left keep",
+ "mtn: resolve_first_left user \"name\"",
+ "mtn: resolve_first_right drop",
+ "mtn: resolve_first_right rename",
+ "mtn: resolve_first_right user_rename \"new_content_name\" \"new_file_name\"",
+ "mtn: resolve_first_right keep",
+ "mtn: resolve_first_right user \"name\""}))
+-- need to specify both left and right resolutions
check(mtn("conflicts", "resolve_first", "drop"), 1, nil, true)
-check(samelines("stderr", {"mtn: misuse: recreated files may not be dropped"}))
+check(samelines("stderr",
+{"mtn: misuse: must specify 'resolve_first_left' or 'resolve_first_right' (not just 'resolve_first')"}))
-check(mtn("conflicts", "resolve_first", "keep"), 0, nil, nil)
+check(mtn("conflicts", "resolve_first_left", "keep"), 0, nil, nil)
+check(mtn("conflicts", "resolve_first_right", "drop"), 0, nil, nil)
check(mtn("conflicts", "show_first"), 0, nil, true)
-check(samelines("stderr",
-{"mtn: conflict: file 'file_11'",
- "mtn: dropped and recreated on the left",
- "mtn: modified on the right",
- "mtn: possible resolutions:",
- "mtn: resolve_first keep",
- "mtn: resolve_first user \"name\""}))
+qgrep("mtn: conflict: file 'file_13'", "stderr")
+qgrep("mtn: dropped and recreated on the left", "stderr")
+qgrep("mtn: modified on the right", "stderr")
mkdir("_MTN")
mkdir("_MTN/resolutions")
-writefile("_MTN/resolutions/file_11", "file_11 user")
-check(mtn("conflicts", "resolve_first", "user", "_MTN/resolutions/file_11"), 0, nil, nil)
+writefile("_MTN/resolutions/file_13", "file_13 user")
+check(mtn("conflicts", "resolve_first_left", "user", "_MTN/resolutions/file_13"), 0, nil, nil)
+check(mtn("conflicts", "resolve_first_right", "drop"), 0, nil, nil)
check(samefilestd("conflicts-recreated-resolved", "_MTN/conflicts"))
check(mtn("explicit_merge", "--resolve-conflicts", left_4, right_4, "testbranch"), 0, nil, true)
check(samelines("stderr",
-{"mtn: [left] 9485fe891d5e23d6dc30140228cd02840ee719e9",
- "mtn: [right] 9a8192d3bf263cbd5782791e823b837d42af6902",
- "mtn: keeping 'file_10' from left",
- "mtn: history for 'file_10' will be lost; see user manual Merge Conflicts section",
- "mtn: replacing content of 'file_11' with '_MTN/resolutions/file_11'",
- "mtn: history for 'file_11' will be lost; see user manual Merge Conflicts section",
+{"mtn: [left] 0745f9674d3e615b29cdb30ffe6e3c6a1db55915",
+ "mtn: [right] 682e750ea71b77bcbbcdf33b6fc7cfa0516766f8",
+ "mtn: keeping 'file_12' from left",
+ "mtn: history for 'file_12' from left will be lost; see user manual Merge Conflicts section",
+ "mtn: dropping 'file_12' from right",
+ "mtn: replacing content of 'file_13' from left with '_MTN/resolutions/file_13'",
+ "mtn: history for 'file_13' from left will be lost; see user manual Merge Conflicts section",
+ "mtn: dropping 'file_13' from right",
"mtn: [merged] 306eb31064512a8a2f4d316ff7a7ec32a1f64f4c"}))
check(mtn("update"), 0, nil, true)
-check(samelines("file_10", {"file_10 left"}))
+check(samelines("file_12", {"file_12 left"}))
-- end of file
============================================================
--- test/func/resolve_conflicts_dropped_modified/conflicts-recreated 26f633aeeee82440eea41f8e1747f2c4262ce9bb
+++ test/func/resolve_conflicts_dropped_modified_1/conflicts-recreated 826d98ed030373bb9b0b778c1a1da792b8f4009a
@@ -1,23 +1,23 @@
- left [9485fe891d5e23d6dc30140228cd02840ee719e9]
- right [9a8192d3bf263cbd5782791e823b837d42af6902]
-ancestor [209e4118bda3960b2f83e48b2368e981ab748ee5]
+ left [0745f9674d3e615b29cdb30ffe6e3c6a1db55915]
+ right [682e750ea71b77bcbbcdf33b6fc7cfa0516766f8]
+ancestor [c8bb2e0efd5e055beea0299c9beecffece46cb4a]
conflict dropped_modified
- ancestor_name "file_10"
-ancestor_file_id [7368a4340573dca149c05db6f49638fafee766d0]
+ ancestor_name "file_12"
+ancestor_file_id [ec21b6df4e9613a1de985ab44f073a78b1f0b0c1]
left_type "modified file"
- left_name "file_10"
- left_file_id [080c590e6e671b1b9ca0e752e1bc468c5167e2a9]
+ left_name "file_12"
+ left_file_id [831efe7eb30ab2dfecc3b3d9e5b68f4d8d8978ca]
right_type "recreated file"
- right_name "file_10"
- right_file_id [59db7ed2afabb782b5a0215d825a86271eb96b8d]
+ right_name "file_12"
+ right_file_id [33f2071587733c13912824370e1ae0e3aa2a296c]
conflict dropped_modified
- ancestor_name "file_11"
-ancestor_file_id [498b49fddbd0418f62eb19d2096de816f3e34116]
+ ancestor_name "file_13"
+ancestor_file_id [833044cd7f5458fe436ddb0058dd9cde0e715715]
left_type "recreated file"
- left_name "file_11"
- left_file_id [bbf158a696465c2feb9ea22fac35ff7088f07ba0]
+ left_name "file_13"
+ left_file_id [c43d02936229a95d852d699ffb14ee8f02ad5311]
right_type "modified file"
- right_name "file_11"
- right_file_id [935f9a7af1da88e7fe541690076c48bac2108052]
+ right_name "file_13"
+ right_file_id [6aaa91015c6fc3b0dc8eeccf2aa22c52fe8dba2a]
============================================================
--- test/func/resolve_conflicts_dropped_modified/conflicts-recreated-resolved 5082532e55e68bc93610d1e8936fe790bb048d3d
+++ test/func/resolve_conflicts_dropped_modified_1/conflicts-recreated-resolved 096988d5f8102507e0e2783f7a6954512a167da5
@@ -1,25 +1,27 @@
- left [9485fe891d5e23d6dc30140228cd02840ee719e9]
- right [9a8192d3bf263cbd5782791e823b837d42af6902]
-ancestor [209e4118bda3960b2f83e48b2368e981ab748ee5]
+ left [0745f9674d3e615b29cdb30ffe6e3c6a1db55915]
+ right [682e750ea71b77bcbbcdf33b6fc7cfa0516766f8]
+ancestor [c8bb2e0efd5e055beea0299c9beecffece46cb4a]
- conflict dropped_modified
- ancestor_name "file_10"
- ancestor_file_id [7368a4340573dca149c05db6f49638fafee766d0]
- left_type "modified file"
- left_name "file_10"
- left_file_id [080c590e6e671b1b9ca0e752e1bc468c5167e2a9]
- right_type "recreated file"
- right_name "file_10"
- right_file_id [59db7ed2afabb782b5a0215d825a86271eb96b8d]
-resolved_keep_left
+ conflict dropped_modified
+ ancestor_name "file_12"
+ ancestor_file_id [ec21b6df4e9613a1de985ab44f073a78b1f0b0c1]
+ left_type "modified file"
+ left_name "file_12"
+ left_file_id [831efe7eb30ab2dfecc3b3d9e5b68f4d8d8978ca]
+ right_type "recreated file"
+ right_name "file_12"
+ right_file_id [33f2071587733c13912824370e1ae0e3aa2a296c]
+ resolved_keep_left
+resolved_drop_right
- conflict dropped_modified
- ancestor_name "file_11"
- ancestor_file_id [498b49fddbd0418f62eb19d2096de816f3e34116]
- left_type "recreated file"
- left_name "file_11"
- left_file_id [bbf158a696465c2feb9ea22fac35ff7088f07ba0]
- right_type "modified file"
- right_name "file_11"
- right_file_id [935f9a7af1da88e7fe541690076c48bac2108052]
-resolved_user_left "_MTN/resolutions/file_11"
+ conflict dropped_modified
+ ancestor_name "file_13"
+ ancestor_file_id [833044cd7f5458fe436ddb0058dd9cde0e715715]
+ left_type "recreated file"
+ left_name "file_13"
+ left_file_id [c43d02936229a95d852d699ffb14ee8f02ad5311]
+ right_type "modified file"
+ right_name "file_13"
+ right_file_id [6aaa91015c6fc3b0dc8eeccf2aa22c52fe8dba2a]
+ resolved_user_left "_MTN/resolutions/file_13"
+resolved_drop_right
============================================================
--- test/func/resolve_conflicts_dropped_modified/conflicts-resolved dd892da237ef4f3a0ee30fa3989374a65d092d68
+++ test/func/resolve_conflicts_dropped_modified_1/conflicts-resolved b2fe24f2d19a8d539c0c89c305a7b58a36ead63e
@@ -14,17 +14,17 @@ resolved_drop_left
right_file_id [4fd0fa24812427ee6c13a839d2a90bc0c6fc0091]
resolved_drop_left
- conflict dropped_modified
- ancestor_name "file_3"
- ancestor_file_id [311aac8e6f1fb6fca84da5153aa6d5a1c6faff79]
- left_type "dropped file"
- left_rev [c2fe3623ce72d248154425dc7db2ddcc397c9aca]
- left_name "file_3"
- left_file_id [311aac8e6f1fb6fca84da5153aa6d5a1c6faff79]
- right_type "modified file"
- right_name "file_3_renamed"
- right_file_id [da7ea65160c9c92f4ed120568229342fe7daa924]
-resolved_drop_left
+ conflict dropped_modified
+ ancestor_name "file_3"
+ ancestor_file_id [311aac8e6f1fb6fca84da5153aa6d5a1c6faff79]
+ left_type "dropped file"
+ left_rev [c2fe3623ce72d248154425dc7db2ddcc397c9aca]
+ left_name "file_3"
+ left_file_id [311aac8e6f1fb6fca84da5153aa6d5a1c6faff79]
+ right_type "modified file"
+ right_name "file_3_renamed"
+ right_file_id [da7ea65160c9c92f4ed120568229342fe7daa924]
+resolved_drop_right
conflict dropped_modified
ancestor_name "file_4"
@@ -38,17 +38,17 @@ resolved_keep_left
right_file_id [259dbd8291bd18ba3fdb9adb3776eb26f94b1230]
resolved_keep_left
- conflict dropped_modified
- ancestor_name "file_5"
- ancestor_file_id [d141bda733292622ebce4c231cbb0da44ac59f40]
- left_type "dropped file"
- left_rev [b0d6953684d49dd6bd345c312d6a0c8fed3078ce]
- left_name "file_5_renamed"
- left_file_id [420cde699a422f7c3d2c8951c46ddfd546db66c0]
- right_type "modified file"
- right_name "file_5"
- right_file_id [e7eb31ab48c2e42126f44ef78ffdb27f388333b0]
-resolved_keep_left
+ conflict dropped_modified
+ ancestor_name "file_5"
+ ancestor_file_id [d141bda733292622ebce4c231cbb0da44ac59f40]
+ left_type "dropped file"
+ left_rev [b0d6953684d49dd6bd345c312d6a0c8fed3078ce]
+ left_name "file_5_renamed"
+ left_file_id [420cde699a422f7c3d2c8951c46ddfd546db66c0]
+ right_type "modified file"
+ right_name "file_5"
+ right_file_id [e7eb31ab48c2e42126f44ef78ffdb27f388333b0]
+resolved_keep_right
conflict dropped_modified
ancestor_name "file_6"
@@ -62,14 +62,14 @@ resolved_user_left "_MTN/resolutions/fil
right_file_id [d5531643d3b5aee3e10eceabbdfecf167148a2d9]
resolved_user_left "_MTN/resolutions/file_6_resolved"
- conflict dropped_modified
- ancestor_name "file_7"
- ancestor_file_id [1a9d3059360fd5f04d0cec05875c8e376da0eaef]
- left_type "dropped file"
- left_rev [c2fe3623ce72d248154425dc7db2ddcc397c9aca]
- left_name "file_7"
- left_file_id [1a9d3059360fd5f04d0cec05875c8e376da0eaef]
- right_type "modified file"
- right_name "file_7_renamed"
- right_file_id [9b362e2754ea1f943497d5a31de3899271ee5a8b]
-resolved_user_left "_MTN/resolutions/file_7_resolved"
+ conflict dropped_modified
+ ancestor_name "file_7"
+ ancestor_file_id [1a9d3059360fd5f04d0cec05875c8e376da0eaef]
+ left_type "dropped file"
+ left_rev [c2fe3623ce72d248154425dc7db2ddcc397c9aca]
+ left_name "file_7"
+ left_file_id [1a9d3059360fd5f04d0cec05875c8e376da0eaef]
+ right_type "modified file"
+ right_name "file_7_renamed"
+ right_file_id [9b362e2754ea1f943497d5a31de3899271ee5a8b]
+resolved_user_right "_MTN/resolutions/file_7_resolved"
============================================================
--- test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/__driver__.lua b3dfb58300c6e9e6762b9132c33e910e05901c29
+++ test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/__driver__.lua f1d2d4f0ba195e43ee31e57f42a9396971656833
@@ -139,8 +139,36 @@ check(qgrep("mtn: dropping 'file_2'", "s
check(mtn("explicit_merge", "--resolve-conflicts", upstream_3, local_2, "testbranch"), 0, nil, true)
check(qgrep("mtn: dropping 'file_2'", "stderr"))
+check(qgrep("mtn: \\[merged\\] 864bfab34bcd301828a985f000c6f8ada712b0ca", "stderr")) -- for comparing with below
check(mtn("update"), 0, nil, true)
check(samelines("file_2", {"file_2 upstream 2"}))
+-- Repeat merge with left, right swapped, to test symmetry in code.
+check(mtn("conflicts", "store", local_2, upstream_3), 0, nil, true)
+check(samefilestd("conflicts_2_3", "_MTN/conflicts"))
+
+check(mtn("conflicts", "resolve_first_right", "keep"), 0, nil, true)
+
+check(mtn("conflicts", "show_first"), 0, nil, true)
+check(samelines("stderr",
+ {"mtn: conflict: file 'file_2'",
+ "mtn: dropped and recreated on the left",
+ "mtn: modified on the right",
+ "mtn: right_resolution: keep",
+ "mtn: possible resolutions:",
+ "mtn: resolve_first_left drop",
+ "mtn: resolve_first_left rename",
+ "mtn: resolve_first_left user_rename \"new_content_name\" \"new_file_name\"",
+ "mtn: resolve_first_left keep",
+ "mtn: resolve_first_left user \"name\""}))
+
+check(mtn("conflicts", "resolve_first_left", "drop"), 0, nil, true)
+check(samefilestd("conflicts_2_3_resolved", "_MTN/conflicts"))
+
+check(mtn("explicit_merge", "--resolve-conflicts", local_2, upstream_3, "testbranch"), 0, nil, true)
+check(qgrep("mtn: dropping 'file_2'", "stderr"))
+check(qgrep("mtn: \\[merged\\] 864bfab34bcd301828a985f000c6f8ada712b0ca", "stderr"))
+-- same revision as merge in other order
+
-- end of file
============================================================
--- /dev/null
+++ test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/conflicts_2_3 1f257fa6e99abf93229af189109b9efe3cfae88f
@@ -0,0 +1,13 @@
+ left [650057e8a81bd41991dc5ff10b2d60343f1032ae]
+ right [48b18ebc7b70733133539384e49a2eedb82e32b2]
+ancestor [27d41ae9f2b3cb73b130d9845d77574a11021b17]
+
+ conflict dropped_modified
+ ancestor_name "file_2"
+ancestor_file_id [7fc990de4797bd6534a5c1deb344e11964f6b353]
+ left_type "recreated file"
+ left_name "file_2"
+ left_file_id [6e49d17f382dc2f03d495181490e7653f1a14ad9]
+ right_type "modified file"
+ right_name "file_2"
+ right_file_id [b7e3240a78dc6afce4507f5a18ab516963e72022]
============================================================
--- /dev/null
+++ test/func/resolve_conflicts_dropped_modified_upstream_vs_local_2/conflicts_2_3_resolved d8b9a96fdaf210a4d1bc495c62c3dcf40114d39e
@@ -0,0 +1,15 @@
+ left [650057e8a81bd41991dc5ff10b2d60343f1032ae]
+ right [48b18ebc7b70733133539384e49a2eedb82e32b2]
+ancestor [27d41ae9f2b3cb73b130d9845d77574a11021b17]
+
+ conflict dropped_modified
+ ancestor_name "file_2"
+ ancestor_file_id [7fc990de4797bd6534a5c1deb344e11964f6b353]
+ left_type "recreated file"
+ left_name "file_2"
+ left_file_id [6e49d17f382dc2f03d495181490e7653f1a14ad9]
+ right_type "modified file"
+ right_name "file_2"
+ right_file_id [b7e3240a78dc6afce4507f5a18ab516963e72022]
+ resolved_drop_left
+resolved_keep_right
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone.issue-209: 23435fa4cb449a54601998a3ac8cb989ec6668c6,
code <=