[RFC] some workflow tweaks

Paul Sherwood paul.sherwood at codethink.co.uk
Wed Aug 6 11:06:24 BST 2014


Hi
I've come across some use-cases where our current workflow is confusing:

# example 1
  $ morph checkout baserock:baserock/definitions master
  $ cd master/baserock/baserock/definitions
  $ morph edit <your-chunk>
# ERROR, because morph tries to create a branch 'master'. most chunks
# already have one. this can happen if we do `morph branch`
#  with any branch name that is used upstream

# example 2
  $ morph branch baserock:baserock/definitions foo
  $ cd foo/baserock/baserock/definitions
  $ morph edit <your-chunk>
  $ cd ../../../upstream/<your-chunk>
  $ git checkout <an-interesting-branch or tag>
  $ morph build
# this doesn't build <an-interesting-branch-or-tag>,
# instead morph builds the foo branch of <your-chunk>

# example 3
  $ morph branch baserock:baserock/definitions foo
  $ cd foo/baserock/baserock/definitions
  $ morph edit <your-chunk>
  $ cd ../../../upstream/<your-chunk>
  $ git bisect start; git bisect bad; git checkout <known-good-commit>
  $ git bisect good
  $ morph build
# this doesn't build the bisected commit, which is a detached head
# instead morph builds the foo branch of <your-chunk>

# example 4
  $ morph branch baserock:baserock/definitions foo
  $ cd foo/baserock/baserock/definitions
  $ add <your-chunk> to a stratum
  $ morph edit <your-chunk>
  $ cd ../../../upstream/<your-chunk>
  $ create <your-chunk>.morph
  $ morph build
# this doesn't find the created .morph file, because it has not been
# committed into git.

So I propose that by default morph should build whatever the
current state is in the workspace directory for edited chunks, ie no
need to explicitly create a branch for the chunk when morph edit fetches
the source. I believe this would be more easily understood by users in
general, and address all of the above use-cases.

Also if we're creating a temporary build branch, could we give it a
meaningful name eg <user.email>-<system-branch-name>-YYMMDD-HH-MM-SS ?

Maybe in this approach, it would be `morph build` which updates the ref
in definitions (inserting the temporary-build-branch name), rather than
`morph edit`

And/But then the process of pushing work up for review needs to tidy
things up. Maybe via a new 'morph publish' command as suggested on irc a
while ago?

br
Paul

-- 
Paul Sherwood                                            Codethink Ltd.
Tel: +44 788 798 4900                    302 Ducie House, Ducie Street,
http://www.codethink.co.uk/         Manchester, M1 2JW, United Kingdom.

Codethink provides advanced software design, development, integration &
test services: from embedded systems to high performance apps to cloud.




More information about the baserock-dev mailing list