summaryrefslogtreecommitdiff
path: root/scripts
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2012-07-12 13:28:20 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2012-07-12 13:28:20 (UTC)
commit0db1d5c8b18eadc4bd9cfc6603e86227fa94b5a9 (patch) (unidiff)
treed494b8f28ec4949ecdacd8d6d95f238d62ecd94c /scripts
parent59d420a7dab19db63cc3f858492dcf0149e53987 (diff)
parent28bcbca9846755746541a516f21fe661445a2bae (diff)
downloadclipperz-0db1d5c8b18eadc4bd9cfc6603e86227fa94b5a9.zip
clipperz-0db1d5c8b18eadc4bd9cfc6603e86227fa94b5a9.tar.gz
clipperz-0db1d5c8b18eadc4bd9cfc6603e86227fa94b5a9.tar.bz2
Merge pull request #43 from jokajak/issue39
Add a fall-back repository class for SNAPSHOTS
Diffstat (limited to 'scripts') (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/builder/repository.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/builder/repository.py b/scripts/builder/repository.py
index a47e249..7ac2324 100644
--- a/scripts/builder/repository.py
+++ b/scripts/builder/repository.py
@@ -11,12 +11,14 @@ def repositoryWithPath (path):
11 except: 11 except:
12 try: 12 try:
13 from git import Repo 13 from git import Repo
14
15 repo = Repo(path) 14 repo = Repo(path)
16 result = GitRepository(repo, path) 15 result = GitRepository(repo, path)
16
17 except ImportError, exception: 17 except ImportError, exception:
18 print "Failed to import git, please install http://gitorious.org/git-python" 18 print "Failed to import git, please install http://gitorious.org/git-python"
19 raise exception 19 raise exception
20 except:
21 result = SnapshotRepository('', path)
20 22
21 23
22 return result 24 return result
@@ -86,3 +88,10 @@ class HgRepository(Repository):
86 88
87 89
88#=================================================================== 90#===================================================================
91
92class SnapshotRepository(Repository):
93 def revision (self):
94 return 'SNAPSHOT'
95
96 def areTherePendingChanges (self):
97 return False