bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
|
0.211.50
by Jelmer Vernooij
Change README to be about Dulwich rather than Python-git. |
1 |
This is the dulwich project. |
|
0.211.2
by James Westby
Make it more like a real project. |
2 |
|
3 |
It aims to give an interface to git repos that doesn't call out to git |
|
|
0.211.50
by Jelmer Vernooij
Change README to be about Dulwich rather than Python-git. |
4 |
directly but instead uses pure Python.
|
|
0.211.2
by James Westby
Make it more like a real project. |
5 |
|
6 |
Currently can read blobs, trees and commits from the files. It reads both
|
|
|
0.211.50
by Jelmer Vernooij
Change README to be about Dulwich rather than Python-git. |
7 |
legacy and new headers. It can write out new indexes as well.
|
|
0.211.2
by James Westby
Make it more like a real project. |
8 |
|
9 |
Can also understand a little about the repository format.
|
|
10 |
||
11 |
Open up a repo by passing it the path to the .git dir. You can then ask for
|
|
12 |
HEAD with repo.head() or a ref with repo.ref(name). Both return the SHA id
|
|
13 |
they currently point to. You can then grab this object with
|
|
14 |
repo.get_object(sha).
|
|
15 |
||
16 |
For the actual objects the ShaFile.from_file(filename) will return the object
|
|
17 |
stored in the file whatever it is. To ensure you get the correct type then
|
|
18 |
call {Blob,Tree,Commit}.from_file(filename). I will add repo methods to do
|
|
19 |
this for you with file lookup soon.
|
|
20 |
||
21 |
There is also support for creating blobs. Blob.from_string(string) will create
|
|
22 |
a blob object from the string. You can then call blob.sha() to get the sha
|
|
23 |
object for this blob, and hexdigest() on that will get its ID. There is
|
|
24 |
currently no method that allows you to write it out though.
|
|
25 |
||
26 |
Everything is currently done with assertions, where much of it should probably
|
|
27 |
be exceptions. This was merely done for expediency. If you hit an assertion,
|
|
28 |
it either means you have done something wrong, there is corruption, or
|
|
29 |
you are trying an unsupported operation.
|
|
30 |
||
|
0.211.50
by Jelmer Vernooij
Change README to be about Dulwich rather than Python-git. |
31 |
The project is named after the part of London that Mr. and Mrs. Git live in
|
32 |
in the particular Monty Python sketch. It is based on the Python-Git module
|
|
33 |
that James Westby <jw+debian@jameswestby.net> released in 2007.
|