From 28bcbca9846755746541a516f21fe661445a2bae Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 19 Jun 2012 16:04:50 +0000 Subject: Add a fall-back repository class for SNAPSHOTS Create a new SnapshotRepository class that returns SNAPSHOT as the version Should let you build if there are any problems with your git repo --- (limited to 'scripts') 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): except: try: from git import Repo - repo = Repo(path) result = GitRepository(repo, path) + except ImportError, exception: print "Failed to import git, please install http://gitorious.org/git-python" raise exception + except: + result = SnapshotRepository('', path) return result @@ -86,3 +88,10 @@ class HgRepository(Repository): #=================================================================== + +class SnapshotRepository(Repository): + def revision (self): + return 'SNAPSHOT' + + def areTherePendingChanges (self): + return False -- cgit v0.9.0.2