path: root/without-test-modules
diff options
authorRichard Maw <>2013-01-24 15:49:10 (GMT)
committerRichard Maw <>2013-01-28 13:04:26 (GMT)
commit6d50cfe8df892b10dd5c1312e013d8e228648bc7 (patch)
treeea62bcff16e3e423835d4ad8776526ec68214574 /without-test-modules
parent0a6ab406c667d8b542ee6008349423a83896297b (diff)
Make morph get its version from git.
When morph is built, it writes various version information from git into morphlib. When morphlib is loaded it attempts to read this version information. if it cannot be found then it checks whether morphlib is being run from inside a git checkout, if it is then it reads the information that way. If it isn't in a git checkout then it raises an exception as builds made in such a fashion are not reproducible. The git version information retained is: 1. The output of git describe This is a relatively human-friendly way of knowing a version and gives a reasonably short output string. This will end with `-unreproducible` if there were uncommitted changes. 2. The commit sha1, so the exact part of Morph's history can be found 3. The tree sha1, so if the branch has been rebased rather than merged such that the commit is lost, you may still be able to find it, though it requires a git-wizard to check it out 4. The branch of morph, so that it's easier to see if the Further possible changes to increase reproducibility include: 1. Not allowing `python build` if there are uncommitted changes 2. Failing to run with uncommitted changes (recommended against since it will just annoy developers who are making changes to morph, and make them commit just to shut it up, then destroy the history later) Requiring an extra flag to build in this case may work better. 3. Reading the uncommitted changes into a tree object and including that would allow it to be recovered if the tree was later committed. 4. Checking whether the commit has been pushed upstream as well. Too annoying to work.
Diffstat (limited to 'without-test-modules')
1 files changed, 1 insertions, 0 deletions
diff --git a/without-test-modules b/without-test-modules
index f1ea523..cb0302c 100644
--- a/without-test-modules
+++ b/without-test-modules
@@ -16,5 +16,6 @@ morphlib/plugins/