From: Ralf Jung Date: Mon, 11 Feb 2013 12:41:28 +0000 (+0100) Subject: Fix SVN.update X-Git-Url: https://git.ralfj.de/mass-build.git/commitdiff_plain/c0813ab32e70aacc90adb18457b57aef8bc9f920 Fix SVN.update --- diff --git a/vcs.py b/vcs.py index 02a9192..3e04f46 100644 --- a/vcs.py +++ b/vcs.py @@ -110,10 +110,11 @@ class SVN: self.folder = os.path.abspath(folder) self.url = url - def update(self, forceVersion=False): + def update(self, mode = MODE_REBASE): + if mode == MODE_FETCH: raise Exception("Just fetching is not supported with SVN") if os.path.exists(self.folder): os.chdir(self.folder) # go into repository - if forceVersion: subprocess.check_call(['svn', 'revert', '-R', '.']) + if mode == MODE_RESET: subprocess.check_call(['svn', 'revert', '-R', '.']) subprocess.check_call(['svn', 'switch', self.url]) # and update to the URL we got else: os.makedirs(self.folder) # if even the parent folder does not exist, svn fails