aboutsummaryrefslogtreecommitdiff
path: root/test/git/test_tree.py
AgeCommit message (Collapse)Author
2010-11-15Optimized test-decorators, by completely removing with_bare_rw_repo, which ↵Sebastian Thiel
was mainly copy-paste from with_rw_repo, what a shame
2010-06-28All tests adjusted to work with the changed internal sha representationSebastian Thiel
2010-06-22Initial frame for implementing read_tree using pure python. As git-read-tree ↵Sebastian Thiel
can do much more than we can ( and faster assumably ), the .new method is used to create new index instances from up to 3 trees. Implemented multi-tree traversal to facilitate building a stage list more efficiently ( although I am not sure whether it could be faster to use a dictionary together with some intensive lookup ), including test Added performance to learn how fast certain operations are, and whether one should be preferred over another
2010-06-14tree: added TreeModifier, allowing to adjust existing trees safely and or ↵Sebastian Thiel
fast, while staying compatible with serialization which requires it to be sorted
2010-06-14Implemented initial version of tree serialization which appears to work ↵Sebastian Thiel
according to a simple test ( presort still needs implementation ) submodule: added stub to allow the tree to return something, its not implemented though
2010-03-04Converted all tabs to 4 space characters each to comply with pep8Sebastian Thiel
2009-12-30tree: implemented recursive paths in __div__ and __getitem__ method, ↵Sebastian Thiel
allowing the keys to contain slashes; adjusted test to check for this
2009-11-27ItemTraversal: Predicate and prune functions now provide depth information, ↵Sebastian Thiel
allowing the callee to know more about its environment
2009-11-26tree: added traversal method, adjusted testsSebastian Thiel
Fixed critical bug in object code: IndexObjects now use their path as hashkey, not the data\!
2009-11-04Improved cmd error handling in case an invalid revision is specified for an ↵Sebastian Thiel
object repo.tree: improved to be less restricting
2009-11-04IndexObject: assured that .path fields are relative to the repository ( ↵Sebastian Thiel
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
2009-11-03object: renamed id attribute to sha as it in fact is always being rewritten ↵Sebastian Thiel
as sha, even if the passed in id was a ref. This is done to assure objects are uniquely identified and will compare correctly
2009-10-21tree.traverse: Added prune functionality - previously the predciate did ↵Sebastian Thiel
both, pruning and preventing to return items
2009-10-14Removed plenty of mocked tree tests as they cannot work anymore with ↵Sebastian Thiel
persistent commands that require stdin AND binary data - not even an adapter would help here. These tests will have to be replaced. test_commit: Improved efficiency of traversal test
2009-10-13tree: renamed content_from_string to _from_string to make it private. ↵Sebastian Thiel
Removed tests that were testing that method
2009-10-12tree: now behaves like a list with string indexing functionality - using a ↵Sebastian Thiel
dict as cache is a problem as the tree is ordered, added blobs, trees and traverse method repo: remove blob function as blobs are created directly or iterated - primitve types should not clutter the repo interface
2009-10-12renamed from_string and list_from_string to _from_string and ↵Sebastian Thiel
_list_from_string to indicate their new status as private method, adjusted all callers respectively
2009-10-11Fixed remaining tests to deal with the changesSebastian Thiel
mode is now generally an int compatible to the stat module
2009-10-11lazymixin system now supports per-attribute baking, it is up to the class ↵Sebastian Thiel
whether it bakes more. This also leads to more efficient use of memory as values are only cached and set when required - the baking system does not require an own tracking variable anymore, and values are only to be cached once - then python will natively find the cache without involving any additional overhead. This works by using __getattr__ instead of __get_attribute__ which would always be called
2009-10-11converted all spaces to tabs ( 4 spaces = 1 tab ) just to allow me and my ↵Sebastian Thiel
editor to work with the files properly. Can convert it back for releaes
2009-10-09Blob|Tree: renamed 'name' member to 'path', updated tests and changelog as ↵Sebastian Thiel
it would make existing code incompatible in some places
2009-09-14Fix unittests for Mock 0.5.0Paul J. Davis
2009-01-24Lots of spring cleaning and added in Sphinx documentation.Michael Trier
2008-12-15Get compatible with mock0.4 (to some extend ;)). Just that MichaelFlorian Apolloner
doesn't need to do the same boring replacing I did. (cherry picked from commit 10c62aa69193a8bc7b46ca24c2ad1d5008489665)
2008-09-17Replace GitPython with git in repr() outputs.Steve Frécinaux
The imported module is called git (as in "import git"), so it's less confusing to do so than to call everything GitPython.something.
2008-09-06Make Tree.content_from_string a static method.Steve Frécinaux
It doesn't use an object's private contents, so let's go...
2008-09-06Implement dict protocol for trees.Steve Frécinaux
It is rather intuitive to consider trees as a dict of objects (like a directory could be seen as a dict of files).
2008-09-05Use a dictionnary for tree contentsSteve Frécinaux
It seems more natural to use a dictionnary for directories, since we usually want to access them by name, and entry order is not relevant. Also, finding a particular blob given its name is O(1) instead of O(N).
2008-07-17Removed method_missing since it was only used in one place.Michael Trier
2008-07-16Added license information to all files.Michael Trier
2008-05-30renamed git_python to git. Removed pop_key and replaced with dict.pop. Fixed ↵Michael Trier
up tests so they pass except for stderr test. Modified version information retrieval.
2008-05-18lots of little fixes. Corrected problem with creating bare repo. Added ↵Michael Trier
Repo.create alias.
2008-05-07Moved test stuff around and modified imports to just clean things up a bit.Michael Trier
2008-05-07cleaned up a bunch of imports for the tests.Michael Trier
2008-05-07initial projectMichael Trier