[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone.issue-209: 787ac8818c6d4fdad
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone.issue-209: 787ac8818c6d4fdadcc0f1257a849d46204a0250 |
Date: |
Thu, 21 Jun 2012 14:29:31 +0200 (CEST) |
revision: 787ac8818c6d4fdadcc0f1257a849d46204a0250
date: 2012-06-21T10:43:09
author: address@hidden
branch: net.venge.monotone.issue-209
changelog:
* src/merge_conflict.cc (resolve_dropped_modified_conflicts): add warning when
resolution loses history
* test/func/resolve_conflicts_dropped_modified_2/__driver__.lua:
* test/func/resolve_conflicts_dropped_modified/__driver__.lua: test warning
manifest:
format_version "1"
new_manifest [0eb5ab9a4ac2cdd01da2c10f790f843fc92a7b71]
old_revision [2c0f9103d5356726f5ff0abf8d3546cc5d22b144]
patch "src/merge_conflict.cc"
from [6fae4b5e0ab1c78bd6be557840d30f8c74d77be5]
to [bfe541054099570c84dec211c6ed9980ec2bf43f]
patch "test/func/resolve_conflicts_dropped_modified/__driver__.lua"
from [650ff8bc711de52a04b983c0bdd734ca14311506]
to [e4f973e6cb8e3494c4b498f68f7cd4b2a6d20fa6]
patch "test/func/resolve_conflicts_dropped_modified_2/__driver__.lua"
from [a477e8cd203c4b69b5662e36cfd32a24b57cb16f]
to [6ac477e0740d4af2cae4bc7cb33099e98cd1fb45]
============================================================
--- src/merge_conflict.cc 6fae4b5e0ab1c78bd6be557840d30f8c74d77be5
+++ src/merge_conflict.cc bfe541054099570c84dec211c6ed9980ec2bf43f
@@ -2840,6 +2840,8 @@ roster_merge_result::resolve_dropped_mod
case resolve_conflicts::content_user:
P(F("replacing content of '%s' with '%s'") %
modified_name % conflict.resolution.second->as_external());
+ P(F("history for '%s' will be lost; see user manual Merge Conflicts section") %
+ modified_name);
if (conflict.recreated == the_null_node)
{
@@ -2872,6 +2874,8 @@ roster_merge_result::resolve_dropped_mod
I(conflict.rename.as_external().length() != 0);
P(F("replacing content of '%s' (renamed to '%s') with '%s'") %
modified_name % conflict.rename.as_external() % conflict.resolution.second->as_external());
+ P(F("history for '%s' will be lost; see user manual Merge Conflicts section") %
+ modified_name);
resolve_dropped_modified_user(roster, nid, modified_fid, conflict, adaptor, nis);
attach_node(lua, roster, nid, file_path_internal (conflict.rename.as_internal()));
@@ -2885,6 +2889,8 @@ roster_merge_result::resolve_dropped_mod
case resolve_conflicts::rename:
P(F("renaming '%s' to '%s'") % modified_name % conflict.resolution.second->as_external());
+ P(F("history for '%s' will be lost; see user manual Merge Conflicts section") %
+ modified_name);
// See comment in keep below on why we drop first.
roster.drop_detached_node(nid);
@@ -2896,6 +2902,8 @@ roster_merge_result::resolve_dropped_mod
if (conflict.recreated == the_null_node)
{
P(F("keeping '%s'") % modified_name);
+ P(F("history for '%s' will be lost; see user manual Merge Conflicts section") %
+ modified_name);
// We'd like to just attach_node here, but that violates a
// fundamental design principle of mtn; nodes are born once,
@@ -2913,6 +2921,8 @@ roster_merge_result::resolve_dropped_mod
else
{
P(F("keeping '%s' from %s") % modified_name % ((conflict.left_nid == the_null_node) ? "right" : "left"));
+ P(F("history for '%s' will be lost; see user manual Merge Conflicts section") %
+ modified_name);
roster.drop_detached_node(nid);
============================================================
--- test/func/resolve_conflicts_dropped_modified/__driver__.lua 650ff8bc711de52a04b983c0bdd734ca14311506
+++ test/func/resolve_conflicts_dropped_modified/__driver__.lua e4f973e6cb8e3494c4b498f68f7cd4b2a6d20fa6
@@ -271,8 +271,10 @@ 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: [merged] 5cafe5405ed31c81f9061be62e38f25aeaaea9c5"}))
-- A special case; drop then re-add vs modify. This used to be the test
@@ -353,7 +355,9 @@ 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: [merged] 306eb31064512a8a2f4d316ff7a7ec32a1f64f4c"}))
check(mtn("update"), 0, nil, true)
============================================================
--- test/func/resolve_conflicts_dropped_modified_2/__driver__.lua a477e8cd203c4b69b5662e36cfd32a24b57cb16f
+++ test/func/resolve_conflicts_dropped_modified_2/__driver__.lua 6ac477e0740d4af2cae4bc7cb33099e98cd1fb45
@@ -50,6 +50,7 @@ check(samelines
{"mtn: [left] 506d8ed51b06c0080e8bb307155a88637045b532",
"mtn: [right] a2889488ed1801a904d0219ec9939dfc2e9be033",
"mtn: keeping 'file_2'",
+ "mtn: history for 'file_2' will be lost; see user manual Merge Conflicts section",
"mtn: [merged] 3df3126220588440def7b08f488ca35eaa94f1b6"}))
check(mtn("update"), 0, nil, true)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone.issue-209: 787ac8818c6d4fdadcc0f1257a849d46204a0250,
code <=