在查看位于此处的 gitpython 教程时,我的机器上存在一些问题。环境是 Windows 7,git 版本 1.7.11.msysgit.1 以及 Python 2.7。使用 easy_install 安装一切正常。Repo 对象成功创建,命令repo.tree()
和repo.branches
工作一样。如果我这样做repo.is_dirty()
,则会出现未找到非特定文件的错误。 WindowsError: [Error 2] The system cannot find the file specified.
有任何想法吗?
path = "c:\\path_to_repo"
repo = Repo(path)
assert repo.bare == False
print repo.tree()
repo.branches
print dir(repo)
#these always crash...
repo.is_dirty()
TIA 寻求帮助。