When sending patches, even it's just one patch, please continue to use
"git send-email" -- having patches as attachments is more cumbersome
for recipients (read: at least for me) than the usual style we use.
As an example, this patch has no cover letter saying which branch to
merge, or even which repository, and though that can be deduced, it's
more work for me.
+1, but you'll have to do the merge yourself. :)
On Thu, Oct 31, 2013 at 02:51:07PM +0000, Dan Firth wrote:
> >From 0a482c4deb490b28ebda263a01fff42dd25c52d2 Mon Sep 17 00:00:00 2001
> From: Daniel Firth <dan.firth(a)codethink.co.uk>
> Date: Wed, 30 Oct 2013 15:19:44 +0000
> Subject: [PATCH] Added scenario test for preventing building uncommitted
> systems
> ---
> morphlib/plugins/branch_and_merge_plugin.py | 9 ++++++++-
> yarns/building.yarn | 11 +++++++++++
> yarns/implementations.yarn | 10 ++++++++++
> 3 files changed, 29 insertions(+), 1 deletion(-)
> create mode 100644 yarns/building.yarn
> diff --git a/morphlib/plugins/branch_and_merge_plugin.py
b/morphlib/plugins/branch_and_merge_plugin.py
> index 260c0e4..a2d2174 100644
> --- a/morphlib/plugins/branch_and_merge_plugin.py
> +++ b/morphlib/plugins/branch_and_merge_plugin.py
> @@ -1765,10 +1765,17 @@ class BranchAndMergePlugin(cliapp.Plugin):
> ['git', 'hash-object', '-t',
'blob', '-w', f.name],
> cwd=repo_dir, env=env)
>
> - self.app.runcmd(
> + try:
> + self.app.runcmd(
> ['git', 'update-index',
'--cacheinfo',
> '100644', morphology_sha1, '%s.morph' %
filename],
> cwd=repo_dir, env=env)
> + except cliapp.AppException, e:
> + raise cliapp.AppException(
> + "You seem to want to build %s, but
'%s.morph' "
> + "doesn't exist in the morphologies repository.
"
> + "Did you forget to commit it?" %
> + (filename, filename))
>
> # Create a commit message including the build UUID. This allows us
> # to collect all commits of a build across repositories and thereby
> diff --git a/yarns/building.yarn b/yarns/building.yarn
> new file mode 100644
> index 0000000..2bd9b1e
> --- /dev/null
> +++ b/yarns/building.yarn
> @@ -0,0 +1,11 @@
> +Morph Building Tests
> +======================
> +
> + SCENARIO attempting to build a system morphology which has never been committed
> + GIVEN a workspace
> + AND a git server
> + WHEN checking out the master system branch
> + AND creating an uncommitted system morphology called base-system-testarch for
architecture testarch in system branch master
> + AND attempting to build the system base-system-testarch in branch master
> + THEN morph failed
> + AND the build error message includes the string "Did you forget to commit
it?"
> diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
> index 2212013..a395453 100644
> --- a/yarns/implementations.yarn
> +++ b/yarns/implementations.yarn
> @@ -277,6 +277,16 @@ Editing morphologies with `morph edit`.
> echo "$MATCH_2" > "$DATADIR/git-branch.wanted"
> diff -u "$DATADIR/git-branch.wanted"
"$DATADIR/git-branch.actual"
>
> + IMPLEMENTS WHEN creating an uncommitted system morphology called (\S+) for
architecture (\S+) in system branch (\S+)
> + cat << EOF >
"$DATADIR/workspace/$MATCH_3/test:morphs/$MATCH_1.morph"
> + arch: $MATCH_2
> + configuration-extensions: []
> + description: A system called $MATCH_1 for architectures $MATCH_2
> + kind: system
> + name: $MATCH_1
> + strata: []
> + EOF
> +
> Reporting status of checked out repositories:
>
> IMPLEMENTS THEN morph reports no outstanding changes in (\S+)
> --
> 1.8.1.2
_______________________________________________
baserock-dev mailing list
baserock-dev(a)baserock.org
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/baserock-dev-basero...
--
http://www.codethink.co.uk/ http://wiki.baserock.org/ http://www.baserock.com/