/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to README

  • Committer: Jelmer Vernooij
  • Date: 2008-12-08 22:22:54 UTC
  • mto: (0.215.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20081208222254-0dkdulf0bjlm4gt1
Rename package to dulwich, add setup.py.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This is the python-git project.
 
2
 
 
3
It aims to give an interface to git repos that doesn't call out to git
 
4
directly. It is probably going to be implemented in pure python.
 
5
 
 
6
Currently can read blobs, trees and commits from the files. It reads both
 
7
legacy and new headers. However it is untested for anything but the simple
 
8
case.
 
9
 
 
10
Can also understand a little about the repository format.
 
11
 
 
12
The testsuite uses the nosetests program from Turbogears, as I got annoyed
 
13
trying to set up unittest.
 
14
 
 
15
Open up a repo by passing it the path to the .git dir. You can then ask for
 
16
HEAD with repo.head() or a ref with repo.ref(name). Both return the SHA id
 
17
they currently point to. You can then grab this object with
 
18
repo.get_object(sha).
 
19
 
 
20
For the actual objects the ShaFile.from_file(filename) will return the object
 
21
stored in the file whatever it is. To ensure you get the correct type then
 
22
call {Blob,Tree,Commit}.from_file(filename). I will add repo methods to do
 
23
this for you with file lookup soon.
 
24
 
 
25
There is also support for creating blobs. Blob.from_string(string) will create
 
26
a blob object from the string. You can then call blob.sha() to get the sha
 
27
object for this blob, and hexdigest() on that will get its ID. There is
 
28
currently no method that allows you to write it out though.
 
29
 
 
30
Everything is currently done with assertions, where much of it should probably
 
31
be exceptions. This was merely done for expediency. If you hit an assertion,
 
32
it either means you have done something wrong, there is corruption, or
 
33
you are trying an unsupported operation.
 
34
 
 
35
If you have any comments or questions you can contact me at 
 
36
jw+debian@jameswestby.net
 
37
 
 
38
James Westby
 
39