author | Clipperz <info@clipperz.com> | 2013-01-09 11:24:13 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-09 11:24:13 (UTC) |
commit | 6cfcbb8deeb99b0b88f5ce3b34a5c9aa1877dc57 (patch) (unidiff) | |
tree | ae7ed58da6d0f4ce64b7ae4a4ba3f7b1519471d3 /scripts/builder/repository.py | |
parent | f6903b9a5670370ef742a02092ab72e4227ddcd9 (diff) | |
parent | 0db1d5c8b18eadc4bd9cfc6603e86227fa94b5a9 (diff) | |
download | clipperz-6cfcbb8deeb99b0b88f5ce3b34a5c9aa1877dc57.zip clipperz-6cfcbb8deeb99b0b88f5ce3b34a5c9aa1877dc57.tar.gz clipperz-6cfcbb8deeb99b0b88f5ce3b34a5c9aa1877dc57.tar.bz2 |
Merge branch 'master' of github.com:clipperz/password-manager
Conflicts:
frontend/beta/css/yui-extensions/basic-dialog.css
Diffstat (limited to 'scripts/builder/repository.py') (more/less context) (ignore whitespace changes)
-rw-r--r-- | scripts/builder/repository.py | 11 |
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 | |||
@@ -10,14 +10,16 @@ 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 | |||
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 |
23 | 25 | ||
@@ -85,4 +87,11 @@ class HgRepository(Repository): | |||
85 | return not all(map(lambda fileList: len(fileList) == 0, self.repository.status())) | 87 | return not all(map(lambda fileList: len(fileList) == 0, self.repository.status())) |
86 | 88 | ||
87 | 89 | ||
88 | #=================================================================== | 90 | #=================================================================== |
91 | |||
92 | class SnapshotRepository(Repository): | ||
93 | def revision (self): | ||
94 | return 'SNAPSHOT' | ||
95 | |||
96 | def areTherePendingChanges (self): | ||
97 | return False | ||