'Update the Eden code'

def pull(self, version=None):

    cwd = os.getcwd()
    folder = current.request.folder
    os.chdir(os.path.join(cwd, folder))
    remove_compiled_application(folder)
    subprocess.call(['git', 'reset', '--hard', 'HEAD'])
    old_version = subprocess.check_output(['git', 'describe', '--always', 'HEAD'])
    self.old_version = old_version.strip()
    subprocess.call(['git', 'pull'])
    if version:
        subprocess.call(['git', 'checkout', version])
    os.chdir(cwd)
