def create_git_file(self, *path): from setuptools_git.utils import check_call filename = join(*path) fd = open(filename, 'wt') fd.write('dummy\n') fd.close() check_call(['git', 'add', filename]) check_call(['git', 'commit', '--quiet', '-m', 'add new file'])
def add_file(self, path): from setuptools_git.utils import check_call check_call(['git', 'add', path]) check_call(['git', 'commit', '--quiet', '-m', 'add new file'])
def new_repo(self): from setuptools_git.utils import check_call directory = realpath(tempfile.mkdtemp()) os.chdir(directory) check_call(['git', 'init', '--quiet', os.curdir]) return directory