Questions tagged [dulwich]

Dulwich is a Python implementation of Git.

Dulwich is a Python implementation of Git.

47 questions
1
vote
1 answer

Python: git remote add -f origin in Dulwich

i want execute git remote add -f origin with dulwich. however, i couldn't find something in this direction. Knows somebody a solution or an alternative in gitpython? Thanks for ideas.
ikreb
  • 2,133
  • 1
  • 16
  • 35
1
vote
1 answer

git-dulwich:how to merge or rebase?

I try to make a website to provide some server, such as collaborative writing at some purposed aims. But I will not to create the same wheel. So I choose git as VCS(version control system) by using dulwich. Everything with dulwich is well, but I…
0
votes
1 answer

How would I go about getting the full commit hash in Dulwich?

I would like to get the behavior of git show -s --format=%H in Dulwich; i.e. getting the full commit hash pointed to by HEAD. However, as it turns out the porcelain.show() function behaves pretty much like git show but doesn't seem to know any…
0xC0000022L
  • 20,597
  • 9
  • 86
  • 152
0
votes
0 answers

Having trouble pip installing dulwich=0.20.25

Trying to run a web application via Pycharm. I needed Microsoft Visual Studio Build 2015, so I downloaded it and now I'm trying to run the code after having just installed it. I need Dulwich 0.20.25, but I get the following errors when I do pip…
0
votes
1 answer

Dulwich porcelain - Reset local repository

Is there a way to completely reset the local repo (discard all locally changed, new or deleted files) and replace it with the remote repo with dulwich.porcelain? I almost managed it using reset, clean and pull. However, I have troubles with deleted…
chris
  • 131
  • 3
0
votes
1 answer

Is dulwich thread safe?

In other words, if I have a MemoryRepo instance, can I be performing a: "fetch(), updating references and performing a send_pack()" on one thread and traversing the commit graph or even introducing a change into the object_store and local…
0
votes
0 answers

How to unpack and delete objects in a dulwich repo?

I am trying to learn how to manipulate the dulwich repository and I can't find how to delete or unpack objects. For example, in the following code: from dulwich import porcelain from dulwich.repo import Repo from dulwich.objects import Blob myrepo…
Nordico
  • 1,226
  • 2
  • 15
  • 31
0
votes
2 answers

Getting current Git branch name using dulwich library

I am trying to get the name of the current branch of a Git repository using the dulwich library. I have spent lots of time looking through dulwich's documentation but could not find out how to do this.
Dull Bananas
  • 892
  • 7
  • 29
0
votes
1 answer

Dulwich cheat sheet: how to reproduce “git log”?

Dear community members, I'm working on a code analysis system and would like to replace calls to CLI Git application with Dulwich module. As a second step I need to replace "git log" command with Dulwich equivalent. Specifically, I'm trying to…
Wladd
  • 21
  • 4
0
votes
1 answer

Dulwich cheat sheet: how to reproduce "git ls-files"?

Dear community members, I'm working on a code analysis system and would like to replace calls to CLI Git application with Dulwich module. As the first step I need to replace "git ls-files" command with Dulwich equivalent. I did it in the following…
Wladd
  • 21
  • 4
0
votes
0 answers

python- dulwich only working in interpreter, but not as a script

I am trying to use dulwich to access my git repositories. I have followed the documentation and installed it as required, and then tried running this simple script: >>> from dulwich.repo import Repo >>> r = Repo() >>> r.head() >>> c…
0
votes
1 answer

How do I remove a file from a git repository with dulwich?

With dulwich I can stage a file using repo.stage, but how do I remove a file ? I am looking for the equivalent of git rm
JE42
  • 4,881
  • 6
  • 41
  • 51
0
votes
1 answer

Python dulwich error when pulling

When I try to pull a folder with dulwich, I got this error: AttributeError: 'NoneType' object has no attribute 'startswith' I got the same error on windows or linux. The clone fonction works perfectly Here is my code: from dulwich import…
Salamafet
  • 5
  • 4
0
votes
1 answer

How to list commits unique to a branch using Dulwich

If I have two release branches v1.25 and v1.25-SOC how to I get commits only in v1.250-SOC and I want to do this for every branch (get only branch specific commits in git). I use dulwich python library. Main idea is I want to find commits which are…
Lahiru
  • 679
  • 1
  • 6
  • 19
0
votes
1 answer

python datetime for git commit time?

I'm having a (django) db that wants datetime objects, and I'd like to feed it data from git commits. Now git commits have that "not really a timezone" offset thingie. What's the correct way to get a python datetime? Any luck with getting timezones…
Pike
  • 166
  • 1
  • 6