From 378f8a97aacfa23fdce8af07719077040f870ee5 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 2 Oct 2012 16:32:45 +0100 Subject: morph merge: Rework how we interact with git Upsides: - clearer error messages on conflicts (we no longer dump the git output) - merge base is available during morphology merging - we no longer need to go through the complexity of implementing a git merge driver We now manually fetch and then merge, instead of using git pull. This is not strictly necessary, but it makes it clearer in the code how FETCH_HEAD is involved in the process. --- tests.branching/merge-conflict-chunks.stderr | 7 +------ tests.branching/merge-conflict-chunks.stdout | 14 ++++---------- tests.branching/merge-conflict-stratum.stderr | 2 +- tests.branching/merge-conflict-stratum.stdout | 8 ++------ tests.branching/merge-with-stratum-renamed.stderr | 2 +- tests.branching/merge-with-stratum-renamed.stdout | 0 6 files changed, 9 insertions(+), 24 deletions(-) create mode 100644 tests.branching/merge-with-stratum-renamed.stdout (limited to 'tests.branching') diff --git a/tests.branching/merge-conflict-chunks.stderr b/tests.branching/merge-conflict-chunks.stderr index 9692d2ec..57aafa5a 100644 --- a/tests.branching/merge-conflict-chunks.stderr +++ b/tests.branching/merge-conflict-chunks.stderr @@ -1,6 +1 @@ -ERROR: merge errors were encountered in the following repositories: - - baserock:stratum2-hello - baserock:stratum3-hello - -Please manually merge the target ref into test/feature in each case in the test/feature system branch, and then repeat the system branch merge. +ERROR: merge errors were encountered. Please manually merge the target ref into test/feature in the remote system branch in each case, and then repeat the 'morph merge' operation. diff --git a/tests.branching/merge-conflict-chunks.stdout b/tests.branching/merge-conflict-chunks.stdout index 75d50c7f..bf6d3828 100644 --- a/tests.branching/merge-conflict-chunks.stdout +++ b/tests.branching/merge-conflict-chunks.stdout @@ -1,10 +1,4 @@ -Merge errors encountered in baserock:stratum2-hello, branch test/stable: -Auto-merging conflict.txt -CONFLICT (add/add): Merge conflict in conflict.txt -Automatic merge failed; fix conflicts and then commit the result. - -Merge errors encountered in baserock:stratum3-hello, branch test/stable: -Auto-merging conflict.txt -CONFLICT (add/add): Merge conflict in conflict.txt -Automatic merge failed; fix conflicts and then commit the result. - +Merge conflicts in baserock:stratum2-hello: + conflict.txt +Merge conflicts in baserock:stratum3-hello: + conflict.txt diff --git a/tests.branching/merge-conflict-stratum.stderr b/tests.branching/merge-conflict-stratum.stderr index 3a7c1522..57aafa5a 100644 --- a/tests.branching/merge-conflict-stratum.stderr +++ b/tests.branching/merge-conflict-stratum.stderr @@ -1 +1 @@ -ERROR: Merging failed in baserock:morphs: please 'git merge' the latest test/stable into test/feature in the 'test/feature' system branch. +ERROR: merge errors were encountered. Please manually merge the target ref into test/feature in the remote system branch in each case, and then repeat the 'morph merge' operation. diff --git a/tests.branching/merge-conflict-stratum.stdout b/tests.branching/merge-conflict-stratum.stdout index 20064406..cce0973c 100644 --- a/tests.branching/merge-conflict-stratum.stdout +++ b/tests.branching/merge-conflict-stratum.stdout @@ -1,6 +1,2 @@ -Merge errors encountered in baserock:morphs, branch test/stable: -Auto-merging hello-system.morph -Auto-merging hello-stratum.morph -CONFLICT (content): Merge conflict in hello-stratum.morph -Automatic merge failed; fix conflicts and then commit the result. - +Merge conflicts in baserock:morphs: + hello-stratum.morph diff --git a/tests.branching/merge-with-stratum-renamed.stderr b/tests.branching/merge-with-stratum-renamed.stderr index ad144f93..ff408036 100644 --- a/tests.branching/merge-with-stratum-renamed.stderr +++ b/tests.branching/merge-with-stratum-renamed.stderr @@ -1 +1 @@ -ERROR: stratum goodbye-stratum was added within this branch and subsequently edited. This is not yet supported: refusing to merge. +ERROR: goodbye-stratum.morph was not found in TMP/workspace/master/baserock:morphs at ref 804a475402fb6ded64a2749c7adf5b33c7c8ce1e diff --git a/tests.branching/merge-with-stratum-renamed.stdout b/tests.branching/merge-with-stratum-renamed.stdout new file mode 100644 index 00000000..e69de29b -- cgit v1.2.1