-rw-r--r-- | scripts/builder/repository.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/builder/repository.py b/scripts/builder/repository.py index 7ac2324..7a44e47 100644 --- a/scripts/builder/repository.py +++ b/scripts/builder/repository.py | |||
@@ -10,13 +10,12 @@ def repositoryWithPath (path): | |||
10 | result = HgRepository(repo, path) | 10 | result = HgRepository(repo, path) |
11 | except: | 11 | except: |
12 | try: | 12 | try: |
13 | from git import Repo | 13 | from git import Repo |
14 | repo = Repo(path) | 14 | repo = Repo(path) |
15 | result = GitRepository(repo, path) | 15 | result = GitRepository(repo, path) |
16 | |||
17 | except ImportError, exception: | 16 | except ImportError, exception: |
18 | print "Failed to import git, please install http://gitorious.org/git-python" | 17 | print "Failed to import git, please install http://gitorious.org/git-python" |
19 | raise exception | 18 | raise exception |
20 | except: | 19 | except: |
21 | result = SnapshotRepository('', path) | 20 | result = SnapshotRepository('', path) |
22 | 21 | ||
@@ -86,12 +85,15 @@ class HgRepository(Repository): | |||
86 | # TODO: FIXME: repository.status() does not report 'unknown(?)' files. :( | 85 | # TODO: FIXME: repository.status() does not report 'unknown(?)' files. :( |
87 | return not all(map(lambda fileList: len(fileList) == 0, self.repository.status())) | 86 | return not all(map(lambda fileList: len(fileList) == 0, self.repository.status())) |
88 | 87 | ||
89 | 88 | ||
90 | #=================================================================== | 89 | #=================================================================== |
91 | 90 | ||
91 | |||
92 | class SnapshotRepository(Repository): | 92 | class SnapshotRepository(Repository): |
93 | |||
93 | def revision (self): | 94 | def revision (self): |
94 | return 'SNAPSHOT' | 95 | return 'SNAPSHOT' |
95 | 96 | ||
97 | |||
96 | def areTherePendingChanges (self): | 98 | def areTherePendingChanges (self): |
97 | return False | 99 | return False |