summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-08-08 23:05:12 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2014-08-12 11:00:09 +0100
commit54e03f2e5005775c8e8c434094256feccd91c488 (patch)
tree7a00a5ea111a2b4b60179bfbb1b985c5a074d9d2 /morphlib
parent4f14465e968be2ff479ddfeaa6eb568881287bed (diff)
downloadmorph-54e03f2e5005775c8e8c434094256feccd91c488.tar.gz
Treat untracked morphologies as uncommitted changes
We used to coincidentally include morphologies because we later include every morphology in the build graph into our temporary build branches. Since we're now checking whether there's any uncommitted changes before attempting to create a temporary build branch, this means that we can no longer build uncommitted morphologies if they aren't reported as changes. So this patch makes an exception to the untracked changes rule for anything that ends with .morph. It's still confusing that some files aren't included in temporary build branches, but that would cause performance regressions, so we'll limit it to just morphologies for now, until we make a decision on what uncomitted content we care about.
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/gitindex.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/morphlib/gitindex.py b/morphlib/gitindex.py
index 978ea0e2..6be4aacb 100644
--- a/morphlib/gitindex.py
+++ b/morphlib/gitindex.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2013 Codethink Limited
+# Copyright (C) 2013-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -97,7 +97,8 @@ class GitIndex(object):
def get_uncommitted_changes(self):
for code, to_path, from_path in self._get_status():
- if code not in (STATUS_UNTRACKED, STATUS_IGNORED):
+ if (code not in (STATUS_UNTRACKED, STATUS_IGNORED)
+ or code == (STATUS_UNTRACKED) and to_path.endswith('.morph')):
yield code, to_path, from_path
def set_to_tree(self, treeish):