From 0e23121d8534bb39ba75186a3c57fe31bb60e45e Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Mon, 27 Feb 2012 15:15:14 +0000 Subject: morph: drop special case .git in mtime setting Either all .gits need to be left alone, including submodules, or all of them get changed. Doing all gets surprisingly complicated, as bottom-up traversal is needed for directories to have their mtimes set, which means that either we check the path for a .git component, or we do our own traversal function, to top-down exclude .git and bottom-up set mtimes. This is more effort than it is worth when git probably doesn't care so let's just drop it entirely. --- morphlib/builder.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'morphlib/builder.py') diff --git a/morphlib/builder.py b/morphlib/builder.py index 2bdbc8ad..385a431f 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -354,13 +354,11 @@ class ChunkBuilder(BlobBuilder): ''' now = time.time() - dot_git = os.path.join(root, '.git') for dirname, subdirs, basenames in os.walk(root, topdown=False): - if dirname != dot_git: - for basename in basenames: - pathname = os.path.join(dirname, basename) - os.utime(pathname, (now, now)) - os.utime(dirname, (now, now)) + 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. -- cgit v1.2.1