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