[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone.issue-209: 6c4dfef59abaf4178
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone.issue-209: 6c4dfef59abaf41783e202dc79fada774d2332a6 |
Date: |
Sun, 10 Jun 2012 03:26:19 +0200 (CEST) |
revision: 6c4dfef59abaf41783e202dc79fada774d2332a6
date: 2012-06-09T17:34:08
author: address@hidden
branch: net.venge.monotone.issue-209
changelog:
add resolve_conflicts_dropped_modified_upstream_vs_local
* test/func/resolve_conflicts_dropped_modified/__driver__.lua: improve ref to
other tests
* test/func/resolve_conflicts_dropped_modified_upstream_vs_local: New directory.
manifest:
format_version "1"
new_manifest [ffaaed3ecc3438cf8182431e05dfb7e47395f970]
old_revision [54a1b63d943a9d445b3fdf33d80e5f9b66d659b1]
add_dir "test/func/resolve_conflicts_dropped_modified_upstream_vs_local"
add_file
"test/func/resolve_conflicts_dropped_modified_upstream_vs_local/__driver__.lua"
content [138b0260d623eca6964febdda7d8c2bd7dccf544]
patch "test/func/resolve_conflicts_dropped_modified/__driver__.lua"
from [fd9589d3d00616a563113e170e278e5db573da5b]
to [d479660a7c57743e58e47eaa616cbd6cbdf91269]
============================================================
--- test/func/resolve_conflicts_dropped_modified/__driver__.lua fd9589d3d00616a563113e170e278e5db573da5b
+++ test/func/resolve_conflicts_dropped_modified/__driver__.lua d479660a7c57743e58e47eaa616cbd6cbdf91269
@@ -1,8 +1,7 @@
-- Test reporting and resolving drop/modified conflicts
--
--- other tests validate resolving in extended use cases:
--- ../resolve_conflicts_dropped_modified_2,
--- ../resolve_conflicts_dropped_modified_vendor
+-- other resolve_conflicts_dropped_modified_* tests validate resolving
+-- in extended use cases.
mtn_setup()
============================================================
--- /dev/null
+++ test/func/resolve_conflicts_dropped_modified_upstream_vs_local/__driver__.lua 138b0260d623eca6964febdda7d8c2bd7dccf544
@@ -0,0 +1,87 @@
+-- Show a problematic use case involving a dropped_modified conflict.
+--
+-- There is an upstream branch, and a local branch. The local branch
+-- deletes a file that the upstream branch continues to modify. We
+-- periodically merge from upstream to local to get other changes, but
+-- never merge in the other direction.
+--
+-- The dropped file causes new dropped_modified conflicts at each
+-- propagate. We decided to always drop; we'd like to be able to tell
+-- mtn that somehow.
+
+mtn_setup()
+
+addfile("file_2", "file_2 base")
+commit("testbranch", "base")
+base = base_revision()
+
+writefile("file_2", "file_2 upstream 1")
+
+commit("testbranch", "upstream 1")
+upstream_1 = base_revision()
+
+revert_to(base)
+
+check(mtn("drop", "file_2"), 0, false, false)
+
+commit("testbranch", "local 1")
+local_1 = base_revision()
+
+check(mtn("show_conflicts", upstream_1, local_1), 0, nil, true)
+check(samelines
+("stderr",
+ {"mtn: [left] 1e700864de7a2cbb1cf85c26f5e1e4ca335d2bc2",
+ "mtn: [right] a2889488ed1801a904d0219ec9939dfc2e9be033",
+ "mtn: [ancestor] f80ff103551d0313647d6c84990bc9db6b158dac",
+ "mtn: conflict: file 'file_2' from revision f80ff103551d0313647d6c84990bc9db6b158dac",
+ "mtn: modified on the left, named file_2",
+ "mtn: dropped on the right",
+ "mtn: 1 conflict with supported resolutions."}))
+
+check(mtn("conflicts", "store", upstream_1, local_1), 0, nil, true)
+
+check(mtn("conflicts", "resolve_first", "drop"), 0, nil, true)
+
+check(mtn("explicit_merge", "--resolve-conflicts", upstream_1, local_1, "testbranch"), 0, nil, true)
+check(samelines
+("stderr",
+ {"mtn: [left] 1e700864de7a2cbb1cf85c26f5e1e4ca335d2bc2",
+ "mtn: [right] a2889488ed1801a904d0219ec9939dfc2e9be033",
+ "mtn: dropping 'file_2'",
+ "mtn: [merged] dd1ba606b52fddb4431da3760ff65b65f6509a48"}))
+
+check(mtn("update"), 0, nil, true)
+check(not exists("file_2"))
+
+local_2 = base_revision()
+
+-- round 2; upstream modifies the file again
+revert_to(upstream_1)
+
+writefile("file_2", "file_2 upstream 2")
+
+commit("testbranch", "upstream 2")
+upstream_2 = base_revision()
+
+check(mtn("show_conflicts", upstream_2, local_2), 0, nil, true)
+check(samelines
+("stderr",
+ {"mtn: [left] 9bf6dcccb01b4566f2470acd0c6afa48f6eaef65",
+ "mtn: [right] dd1ba606b52fddb4431da3760ff65b65f6509a48",
+ "mtn: [ancestor] 1e700864de7a2cbb1cf85c26f5e1e4ca335d2bc2",
+ "mtn: conflict: file 'file_2' from revision 1e700864de7a2cbb1cf85c26f5e1e4ca335d2bc2",
+ "mtn: modified on the left, named file_2",
+ "mtn: dropped on the right",
+ "mtn: 1 conflict with supported resolutions."}))
+
+check(mtn("conflicts", "store", upstream_2, local_2), 0, nil, true)
+
+check(mtn("conflicts", "resolve_first", "drop"), 0, nil, true)
+
+check(mtn("explicit_merge", "--resolve-conflicts", upstream_2, local_2, "testbranch"), 0, nil, true)
+check(qgrep("mtn: dropping 'file_2'", "stderr"))
+
+check(mtn("update"), 0, nil, true)
+check(not exists("file_2"))
+
+-- end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone.issue-209: 6c4dfef59abaf41783e202dc79fada774d2332a6,
code <=