diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-26 23:24:56 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-26 23:24:56 +0100 |
commit | 2792e534dd55fe03bca302f87a3ea638a7278bf1 (patch) | |
tree | 28d8f1cc81d8d121a9976204ee10be22996f6e2d /lib/git/actor.py | |
parent | 1b89f39432cdb395f5fbb9553b56595d29e2b773 (diff) | |
parent | 0ef1f89abe5b2334705ee8f1a6da231b0b6c9a50 (diff) | |
download | gitpython-2792e534dd55fe03bca302f87a3ea638a7278bf1.tar.gz |
Merge branch 'index' into improvements
* index:
index.add: Finished implemenation including through tests
When parsing trees, we now store the originan type bits as well, previously we dropped it
cmd.wait: AutoKill wrapped process will automatically raise on errors to unify error handling amongst clients using the process directly. It might be needed to add a flag allowing to easily override that
added head kwarg to reset and commit method, allowing to automatically change the head to the given commit, which makes the methods more versatile
refs.SymoblicRef: implemented direcft setting of the symbolic references commit, which possibly dereferences to the respective head
index.commit: implemented initial version, but in fact some more changes are required to have a nice API. Tests are not yet fully done either
actor: added __eq__, __ne__ and __hash__ methods including simple test
index.remove implemented including throrough test
Implemented index.reset method including test
IndexEntry is now based on a 'minimal' version that is suitable to be fed into UpdateIndex. The Inode and device information is only needed to quickly compare the index against the working tree for changes, hence it should not be that dominant in the API either. More changes to come
Added notes about git-update-ref
Refs can now set the reference they are pointing to in a controlled fashion by writing their ref file directly
Added TagRefernce creation and deletion including tests
Implemented head methods: create, delete, rename, including tests
refs: added create, delete and rename methods where appropriate. Tests are marked, implementation is needed for most of them
Added frame for IndexFile add/remove/commit methods and respective test markers
Added repo.index property including simple test, and additional ideas in the TODO list
Renamed Index to IndexFile, adjusted tests, it will only operate on physical files, not on streams, as Indices are not streamed by any git command ( at least not in raw format )
Diffstat (limited to 'lib/git/actor.py')
-rw-r--r-- | lib/git/actor.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/git/actor.py b/lib/git/actor.py index fe4a47e5..04872f1c 100644 --- a/lib/git/actor.py +++ b/lib/git/actor.py @@ -18,6 +18,15 @@ class Actor(object): self.name = name self.email = email + def __eq__(self, other): + return self.name == other.name and self.email == other.email + + def __ne__(self, other): + return not (self == other) + + def __hash__(self): + return hash((self.name, self.email)) + def __str__(self): return self.name |