diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-09-27 18:41:19 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-09-27 19:22:22 +0100 |
commit | fcf40483bfab8c902ff5c09214a8ca768303eb98 (patch) | |
tree | 3925d5a49bc64df7eef8782a364a3835bba4f7df | |
parent | c821535c6290e47cabf85691b41d6b7dd20a7982 (diff) | |
download | morph-fcf40483bfab8c902ff5c09214a8ca768303eb98.tar.gz |
morph merge: Error message wrangling
These do need to be quite clear, because merge failures will happen a
lot and we are relatively unhelpful at the moment.
-rw-r--r-- | morphlib/plugins/branch_and_merge_plugin.py | 11 | ||||
-rw-r--r-- | tests.branching/merge-conflict-chunks.stderr | 2 | ||||
-rw-r--r-- | tests.branching/merge-conflict-stratum.stderr | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index 6f089819..468695d9 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -843,9 +843,9 @@ class BranchAndMergePlugin(cliapp.Plugin): to_branch_dir, root_repo, to_branch) if to_root_dir is None: raise cliapp.AppException( - 'Merging failed in %s: please manually merge %s into %s ' - 'in this repo and try again.' % - (root_repo, to_branch, from_branch)) + 'Merging failed in %s: please \'git merge\' the latest %s ' + 'into %s in the \'%s\' system branch.' % + (root_repo, to_branch, from_branch, from_branch)) for f in glob.glob(os.path.join(to_root_dir, '*.morph')): name = os.path.basename(f)[:-len('.morph')] @@ -855,9 +855,10 @@ class BranchAndMergePlugin(cliapp.Plugin): raise cliapp.AppException( 'merge errors were encountered in the following %s:\n\n' '\t%s\n\nPlease manually merge the target ref into %s in ' - 'each case, and then merge the system branch.' % + 'each case in the %s system branch, and then repeat the ' + 'system branch merge.' % ('repository' if len(failed_repos)==1 else 'repositories', - '\n\t'.join(failed_repos), from_branch)) + '\n\t'.join(failed_repos), from_branch, from_branch)) for repo_dir in dirty_repo_dirs: # Repo will often turn out to not be dirty: if the changes we diff --git a/tests.branching/merge-conflict-chunks.stderr b/tests.branching/merge-conflict-chunks.stderr index 0bdc9475..9692d2ec 100644 --- a/tests.branching/merge-conflict-chunks.stderr +++ b/tests.branching/merge-conflict-chunks.stderr @@ -3,4 +3,4 @@ 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, and then merge the system branch. +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. diff --git a/tests.branching/merge-conflict-stratum.stderr b/tests.branching/merge-conflict-stratum.stderr index 36781ad7..3a7c1522 100644 --- a/tests.branching/merge-conflict-stratum.stderr +++ b/tests.branching/merge-conflict-stratum.stderr @@ -1 +1 @@ -ERROR: Merging failed in baserock:morphs: please manually merge test/stable into test/feature in this repo and try again. +ERROR: Merging failed in baserock:morphs: please 'git merge' the latest test/stable into test/feature in the 'test/feature' system branch. |