summaryrefslogtreecommitdiff
path: root/lib/git/objects/base.py
Commit message (Collapse)AuthorAgeFilesLines
* Added utilities helping to create proper paths either with slashes or ↵Sebastian Thiel2009-11-051-3/+5
| | | | | | | backslashes depending on the operating system fixed test_refs and test_trees Many more issues remain though, this is just a first backup commit
* IndexObject: assured that .path fields are relative to the repository ( ↵Sebastian Thiel2009-11-041-0/+17
| | | | | | previously it would just be a name ) added abspath property and name property to provide easy access to most common paths of an index object
* object: renamed id attribute to sha as it in fact is always being rewritten ↵Sebastian Thiel2009-11-031-17/+17
| | | | as sha, even if the passed in id was a ref. This is done to assure objects are uniquely identified and will compare correctly
* index.remove implemented including throrough testSebastian Thiel2009-10-231-0/+1
|
* Stream_data streams data to a given output stream most efficiently with a ↵Sebastian Thiel2009-10-221-0/+12
| | | | | | | | | | | low memory footprint. Still, the git-cat-file command keeps all data in an interal buffer instead of streaming it directly. This is a git design issue though, and will be hard to address without some proper git-hacking. Conflicts: lib/git/cmd.py
* added Object.data_stream property allowing to stream object data ↵Sebastian Thiel2009-10-221-0/+12
| | | | directly.Considering the implementation of the git commnd which temporarily keeps it in a cache, it doesnt make a huge diffence as the data is kept in memory while streaming. Only good thing is that it is in a different process so python will never see it if done properly
* resolved cyclic inclusion issue by moving the Diffable interface into the ↵Sebastian Thiel2009-10-181-75/+0
| | | | diff module, which probably is the right thing to do anyway
* implemented diff tests, but will have to move the diff module as it needs to ↵Sebastian Thiel2009-10-181-2/+5
| | | | create objects, whose import would create a dependency cycle
* added Diffable interface to objects.base, its used by Commit and Tree objects.Sebastian Thiel2009-10-161-0/+71
| | | | Diff class has been prepared to process raw input, but its not yet more than a frame
* Fixed object bug that would cause object ids not to be resolved to sha's as ↵Sebastian Thiel2009-10-161-12/+20
| | | | | | this was assumed - now there is a test for it as well repo: removed diff and commit_diff methods, added 'head' property returning the current head as Reference object
* Object can now create objects of the proper type in case one attempts to ↵Sebastian Thiel2009-10-151-0/+15
| | | | create an object directly - this feature is used in several places now, allowing for additional type-checking
* tree: now reads tress directly by parsing the binary data, allowing it to ↵Sebastian Thiel2009-10-141-3/+4
| | | | safe possibly hundreds of command calls
* persistent command signature changed to also return the hexsha from a ↵Sebastian Thiel2009-10-141-2/+2
| | | | possible input ref - the objects pointed to by refs are now baked on demand - perhaps it should change to always be re-retrieved using a property as it is relatively fast - this way refs can always be cached
* test_blob: removed many redundant tests that would fail now as the mock ↵Sebastian Thiel2009-10-141-2/+6
| | | | | | cannot handle the complexity of the command backend All objects but Tree now use the persistent command to read their object information - Trees get binary data and would need their own pretty-printing or they need to parse the data themselves which is my favorite
* test: Added time-consuming test which could also be a benchmark in fact - ↵Sebastian Thiel2009-10-141-1/+1
| | | | | | | currently it cause hundreds of command invocations which is slow Fixed issue with trees not properly initialized with their default mode _set_cache_: some objects checked whether the attribute was within their __slots__ although it should have been accessed through its class
* IndexObjects are now checking their slots to raise a proper error message in ↵Sebastian Thiel2009-10-121-1/+8
| | | | case someone tries to access an unset path or mode - this information cannot be retrieved afterwards as IndexObject information is kept in the object that pointed at them. To find this information, one would have to search all objects which is not feasible
* refs now take repo as first argument and derive from LazyMixin to allow them ↵Sebastian Thiel2009-10-121-24/+1
| | | | | | to dynamically retrieve their objects Improved way commits are returned by refs as they now use the path to be sure they always point to the ref even if it changes - previously it would use the sha intead so it would not update after being cached on the ref object
* Reorganized package structure and cleaned up importsSebastian Thiel2009-10-121-0/+162