dulwich

How do I correctly install dulwich to get hg-git working on Windows?

浪子不回头ぞ 提交于 2019-12-03 03:25:49
问题 I'm trying to use the hg-git Mercurial extension on Windows (Windows 7 64-bit, to be specific). I have Mercurial and Git installed. I have Python 2.5 (32-bit) installed. I followed the instructions on http://hg-git.github.com/ to install the extension. The initial easy_install failed because it was unable to compile dulwich without Visual Studio 2003. I installed dulwich manually by: git clone git://git.samba.org/jelmer/dulwich.git cd dulwich c:\Python25\python setup.py --pure install Now

How do I correctly install dulwich to get hg-git working on Windows?

半腔热情 提交于 2019-12-02 16:57:28
I'm trying to use the hg-git Mercurial extension on Windows (Windows 7 64-bit, to be specific). I have Mercurial and Git installed. I have Python 2.5 (32-bit) installed. I followed the instructions on http://hg-git.github.com/ to install the extension. The initial easy_install failed because it was unable to compile dulwich without Visual Studio 2003. I installed dulwich manually by: git clone git://git.samba.org/jelmer/dulwich.git cd dulwich c:\Python25\python setup.py --pure install Now when I run easy_install hg-git, it succeeds (since the dulwich dependency is satisfied). In my C:\Users

Programmatically `git checkout .` with dulwich

本秂侑毒 提交于 2019-11-30 07:49:32
Having this code from dulwich.objects import Blob, Tree, Commit, parse_timezone from dulwich.repo import Repo from time import time repo = Repo.init("myrepo", mkdir=True) blob = Blob.from_string("my file content\n") tree = Tree() tree.add("spam", 0100644, blob.id) commit = Commit() commit.tree = tree.id author = "Flav <foo@bar.com>" commit.author = commit.committer = author commit.commit_time = commit.author_time = int(time()) tz = parse_timezone('+0200')[0] commit.commit_timezone = commit.author_timezone = tz commit.encoding = "UTF-8" commit.message = "initial commit" o_sto = repo.object