diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-02-24 13:50:07 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-02-24 13:50:07 +0000 |
commit | 75cdd67ca4064ea8ab6a4c1dea155387d6d59327 (patch) | |
tree | 58f96b80a8957ef26db4f628d105df6d7e59783c /morphlib/builder.py | |
parent | 4cf7cfd1890f86de87f0b7c53d6bbd9b71e7ff35 (diff) | |
download | morph-75cdd67ca4064ea8ab6a4c1dea155387d6d59327.tar.gz |
Exclude the .git directory from mtime changing, just in case
Diffstat (limited to 'morphlib/builder.py')
-rw-r--r-- | morphlib/builder.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py index 34b77087..d477d9e9 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -354,12 +354,14 @@ class ChunkBuilder(BlobBuilder): ''' now = time.time() + dot_git = os.path.join(root, '.git') for dirname, subdirs, basenames in os.walk(root, topdown=False): - for basename in basenames: - pathname = os.path.join(dirname, basename) - os.utime(pathname, (now, now)) - os.utime(dirname, (now, now)) - + if dirname != dot_git: + for basename in basenames: + pathname = os.path.join(dirname, basename) + os.utime(pathname, (now, now)) + os.utime(dirname, (now, now)) + def build_with_system_or_commands(self): '''Run explicit commands or commands from build system. |