#
# patch "ChangeLog"
# from [f36da866416989a6399a2f6d9797b129547c6b9c]
# to [9df88607ee3b9fde1203282405f9fee132ba61d3]
#
# patch "change_set.cc"
# from [002e0964b7401655ae7ab7fe308cb82be578e89a]
# to [8c37c6f09b401fcf164561e83f7c0f6e04d6358d]
#
# patch "lua.cc"
# from [40cea21efcbbbcb98eb2c502cf971b10ab76e521]
# to [06b516d959c5061c34107be35a5673217de796b8]
#
# patch "lua.hh"
# from [38945dd7ac35f3f1ef7d4027ad1874f8b3716e26]
# to [62639d2342ef3924e4077b614bef6b5fd7a57358]
#
# patch "pcdv.cc"
# from [e5afc13109510eba3626bacb2c335c5ea9b479e4]
# to [109b9384a6d250b492e7704aa2e3a9e1b2be001f]
#
# patch "pcdv.hh"
# from [17325b49d29d3b78d11828c7355867d975d63229]
# to [8c7faa78892b3ec390925c665c00cd50df87181c]
#
# patch "std_hooks.lua"
# from [b6bde98342f50a4bd4f89e236849bdea43399397]
# to [350e0f8222b1e2174ff85844718d6aaf1477ab25]
#
========================================================================
--- ChangeLog f36da866416989a6399a2f6d9797b129547c6b9c
+++ ChangeLog 9df88607ee3b9fde1203282405f9fee132ba61d3
@@ -1,5 +1,10 @@
2005-08-22 Timothy Brownawell
+ * tree merger: Allow tree conflicts to be resolved by the user.
+ New lua hook resolve_path_conflicts.
+
+2005-08-22 Timothy Brownawell
+
* commands.cc: remove tree merger from the pcdv test driver
2005-08-22 Timothy Brownawell
@@ -139,49 +144,6 @@
Will be moved to a more appropriate home once it works (currenty
has insane memory usage).
-2005-08-20 Matthew Gregan
-
- * revision.hh: Delete doubled line of text in comment.
-
-2005-08-20 Benoît Dejean
-
- * monotone.cc (cpp_main): setlocale(LC_ALL).
- * commands.cc (dropkey): Unify warning into a single string.
-
-2005-08-20 Nathaniel Smith
-
- * contrib/monoprof.sh (test_commit): Kernel tarball unpacks to
- linux-$KVER/, not $KVER/.
-
-2005-08-19 Nathaniel Smith
-
- * contrib/monoprof.sh (SETUP): Put netsync hooks in the default
- hook file.
-
-2005-08-19 Nathaniel Smith
-
- * contrib/monoprof.sh: Give a sensible error message if $DATADIR
- doesn't exist.
-
-2005-08-20 Matt Johnston
-
- * database.cc (put_revision): uncomment check_sane_history call
- (was accidentally committed commented out)
-
-2005-08-19 Nathaniel Smith
-
- * monotone.texi (Tutorial): Tweak wording, use --db at more
- appropriate places.
-
-2005-08-19 Matthew Gregan
-
- * tests/t_crlf.at: Adjust expected line count to accomodate diff
- output change.
- * commands.cc (CMD(diff)): Include base revision ID in diff output
- header when diffing against working copy. Useful to identify what
- revision a patch was created against.
- * std_hooks.lua (ignore_file): Ignore Visual SourceSafe junk.
-
2005-08-18 Timothy Brownawell
* std_hooks.lua: accept_testresult_change now only cares about
========================================================================
--- change_set.cc 002e0964b7401655ae7ab7fe308cb82be578e89a
+++ change_set.cc 8c37c6f09b401fcf164561e83f7c0f6e04d6358d
@@ -1904,11 +1904,19 @@
}
tree_state
-merge_trees(tree_state l, tree_state r)
+merge_trees(tree_state l, tree_state r, app_state & app)
{
std::vector conf(l.conflict(r));
MM(conf);
std::set res;
+ if (!conf.empty())
+ {
+ data c, r;
+ write_path_conflicts(conf, c);
+ app.lua.hook_resolve_path_conflicts(c, r);
+ read_path_resolutions(r, res);
+ }
+/*
for (std::vector::const_iterator i = conf.begin();
i != conf.end(); ++i)
{
@@ -1917,6 +1925,7 @@
if (i->type == path_conflict::collision)
W(F("Filename collision, suturing..."));
}
+*/
std::vector lr;
lr.push_back(l);
lr.push_back(r);
@@ -2075,7 +2084,7 @@
tree_state r = k->second;
// do the merge
- tree_state m = merge_trees(l, r);
+ tree_state m = merge_trees(l, r, app);
// calculate outputs
calculate_itempaths(a, l, r, m, paths, itx);
@@ -2238,7 +2247,7 @@
tree_state changes = merge_trees(treevec, chvec, itx, "changes");
// merge
- tree_state result = merge_trees(left, changes);
+ tree_state result = merge_trees(left, changes, app);
// calculate outputs
std::vector paths;
========================================================================
--- lua.cc 40cea21efcbbbcb98eb2c502cf971b10ab76e521
+++ lua.cc 06b516d959c5061c34107be35a5673217de796b8
@@ -1336,3 +1336,18 @@
ll.call(4, 0);
return ll.ok();
}
+
+bool
+lua_hooks::hook_resolve_path_conflicts(data const & orig,
+ data & result)
+{
+ string res;
+ bool ok = Lua(st)
+ .func("resolve_path_conflicts")
+ .push_str(orig())
+ .call(1,1)
+ .extract_str(res)
+ .ok();
+ result = res;
+ return ok;
+}
========================================================================
--- lua.hh 38945dd7ac35f3f1ef7d4027ad1874f8b3716e26
+++ lua.hh 62639d2342ef3924e4077b614bef6b5fd7a57358
@@ -135,6 +135,9 @@
rsa_keypair_id const & kid,
cert_name const & name,
cert_value const & value);
+
+ bool hook_resolve_path_conflicts(data const & orig,
+ data & result);
};
#endif // __LUA_HH__
========================================================================
--- pcdv.cc e5afc13109510eba3626bacb2c335c5ea9b479e4
+++ pcdv.cc 109b9384a6d250b492e7704aa2e3a9e1b2be001f
@@ -1,7 +1,8 @@
#include
#include