From 48ff511df6f175e27ca365f644eac60875e09c94 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 26 Sep 2012 16:51:44 +0100 Subject: morph merge: Use a special git merge driver for morphology files We now have a two-stage merge process. Stage one only runs if there are changes in both branches on the same file. At the end of stage one we assume that all the components that were edited in the FROM branch still have their 'ref' field set to the FROM branch. Morph then iterates through these repositories, performing a merge in each one, and then updates the refs in the morphologies again with the correct target branches. --- tests.branching/merge-conflict-chunks.stdout | 4 ++-- tests.branching/merge-conflict-stratum.stdout | 3 +-- tests.branching/merge.script | 4 +++- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'tests.branching') diff --git a/tests.branching/merge-conflict-chunks.stdout b/tests.branching/merge-conflict-chunks.stdout index cfb9949d..75d50c7f 100644 --- a/tests.branching/merge-conflict-chunks.stdout +++ b/tests.branching/merge-conflict-chunks.stdout @@ -1,9 +1,9 @@ -Merge errors encountered merging into test/stable in repo baserock:stratum2-hello: +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 merging into test/stable in repo baserock:stratum3-hello: +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. diff --git a/tests.branching/merge-conflict-stratum.stdout b/tests.branching/merge-conflict-stratum.stdout index a3bb4cc0..20064406 100644 --- a/tests.branching/merge-conflict-stratum.stdout +++ b/tests.branching/merge-conflict-stratum.stdout @@ -1,6 +1,5 @@ -Merge errors encountered merging into test/stable in repo baserock:morphs: +Merge errors encountered in baserock:morphs, branch test/stable: Auto-merging hello-system.morph -CONFLICT (content): Merge conflict in 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. diff --git a/tests.branching/merge.script b/tests.branching/merge.script index 9dbc2d84..d73e4835 100755 --- a/tests.branching/merge.script +++ b/tests.branching/merge.script @@ -31,11 +31,13 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" branch baserock:morphs baserock/newbranch # Make a change to a chunk. +cd baserock/newbranch "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello -cd baserock/newbranch/baserock:hello +cd baserock:hello touch newfile.txt git add newfile.txt git commit -m foo --quiet +git push --quiet origin baserock/newbranch # Commit in morphs repo cd ../baserock:morphs -- cgit v1.2.1