X-Git-Url: https://git.ralfj.de/mass-build.git/blobdiff_plain/c6f446c1a9af8dcdcfae87aae36656741aafca0c..02d6ae3b48b56e1b830239099fa485669fae52e5:/vcs.py diff --git a/vcs.py b/vcs.py index d20ebeb..785a9ba 100644 --- a/vcs.py +++ b/vcs.py @@ -1,6 +1,6 @@ import os, git, subprocess -'''A VCS must have an "update" method with an optional "forceVersion" parameter, and a "version" method.''' +'''A VCS must have an "update" method with an optional "forceVersion" parameter, and optionally a "version" method.''' # Fetch updates from git class Git: @@ -45,6 +45,9 @@ class Git: repo.head.reset(self.commit, working_tree=True) else: repo.git.rebase(self.commit) + # update submodules + repo.git.submodule("update", "--init", "--recursive", "--rebase") + # done print "...done", if repo.head.reference.commit != repo.commit(self.commit): print "(keeping local patches around)", @@ -58,10 +61,9 @@ class Git: # Fetch updates via SVN class SVN: - def __init__(self, folder, url, versionName): + def __init__(self, folder, url): self.folder = os.path.abspath(folder) self.url = url - self.versionName = versionName def update(self, forceVersion=False): if os.path.exists(self.folder): @@ -70,6 +72,3 @@ class SVN: subprocess.check_call(['svn', 'switch', self.url]) # and update to the URL we got else: subprocess.check_call(['svn', 'co', self.url, self.folder]) # just download it - - def version(self): - return self.versionName