author | Clipperz <info@clipperz.com> | 2013-01-09 11:45:31 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-09 11:45:31 (UTC) |
commit | 9741a93a9f5c76827135b43c03b20c0a48f12604 (patch) (side-by-side diff) | |
tree | 1a8fff379a033d873c9e1c7faff755fb6bb7b118 /scripts | |
parent | 8ef30d00eb96004c39540019336c0ec99dae01cb (diff) | |
download | clipperz-9741a93a9f5c76827135b43c03b20c0a48f12604.zip clipperz-9741a93a9f5c76827135b43c03b20c0a48f12604.tar.gz clipperz-9741a93a9f5c76827135b43c03b20c0a48f12604.tar.bz2 |
Merge latest changes with public repository
-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 @@ -4,25 +4,24 @@ def repositoryWithPath (path): try: from mercurial import ui, hg repo = hg.repository(ui.ui(), path) result = HgRepository(repo, 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 #=================================================================== @@ -80,18 +79,21 @@ class HgRepository(Repository): def revision (self): return 'hg:' + str(self.repository['tip']) def areTherePendingChanges (self): # TODO: FIXME: repository.status() does not report 'unknown(?)' files. :( return not all(map(lambda fileList: len(fileList) == 0, self.repository.status())) #=================================================================== + class SnapshotRepository(Repository): + def revision (self): return 'SNAPSHOT' + def areTherePendingChanges (self): return False |