summaryrefslogtreecommitdiff
path: root/lib/git/objects/commit.py
Commit message (Collapse)AuthorAgeFilesLines
* moved all contents, incl. submodule gitdb, up to the root directorySebastian Thiel2010-11-211-472/+0
|
* ORIG_HEAD handling is now implemented in the ref-class itself, instead of ↵Sebastian Thiel2010-11-181-3/+0
| | | | | | being a special case of the commit method; includes tests util: Fixed iterable lists, which broke due to an incorrectly implemented __contains__ method
* commit: when creating a new commit and advancing the head, it will now write ↵Sebastian Thiel2010-11-181-0/+6
| | | | the ORIG_HEAD reference as well
* Objects: Constructor now manually checks and sets the input arguments to the ↵Sebastian Thiel2010-11-151-3/+22
| | | | | | local cache - previously a procedural approach was used, which was less code, but slower too. Especially in case of CommitObjects unrolling the loop manually makes a difference. Submodule: Implemented query methods and did a bit of testing. More is to come, but the test works for now. As special addition, the submodule implementation uses the section name as submodule ID even though it seems to be just the path. This allows to make renames easier
* Fixed bug that would cause the author's email to be a generic default one, ↵Sebastian Thiel2010-10-271-2/+2
| | | | | | instead of the existing and valid. The rest of the ConfigParser handling is correct, as it reads all configuration files available to git see http://github.com/Byron/GitPython/issues#issue/1
* Added unicode handling for author names. They will now be properly encoded ↵Sebastian Thiel2010-10-151-2/+14
| | | | into the byte stream, as well as decoded from it
* unicode handling in messages and trees was improved. Messages are now ↵Sebastian Thiel2010-08-131-1/+13
| | | | written according to the encoding of the commit object, and decoded using that information as well. Trees will encode and decode their names with utf8
* Renamed modules utils to util, and errors to exc to be more conforming to ↵Sebastian Thiel2010-06-291-2/+2
| | | | the submodules's naming conventions
* Updated and fixed sphinx API docs, which included one quick skim-throughSebastian Thiel2010-06-291-1/+1
|
* Diff: fixed bug that caused a string to end up as a blob modeSebastian Thiel2010-06-291-0/+2
|
* All tests adjusted to work with the changed internal sha representationSebastian Thiel2010-06-281-9/+10
|
* Adjusted all files to (hopefully) deal with the fact that all objects now ↵Sebastian Thiel2010-06-251-103/+84
| | | | | | | use 20 byte sha's internally as it is closer to the GitDB implementation Switched all remaining files back to tabs Adjusted all remaining docstrings to suit the sphinx doc convention - its likely that there are many of docstring syntax errors though
* Moved small types that had their own module into the utils moduleSebastian Thiel2010-06-141-6/+8
|
* tree: added TreeModifier, allowing to adjust existing trees safely and or ↵Sebastian Thiel2010-06-141-1/+1
| | | | fast, while staying compatible with serialization which requires it to be sorted
* Removed odb from project, it is now used as a submodule named gitdb, which ↵Sebastian Thiel2010-06-121-1/+1
| | | | | | was added instead Adjusted all imports to deal with the changed package names
* Fixed implementation after design change to deal with it - all tests run, ↵Sebastian Thiel2010-06-041-1/+3
| | | | but next there will have to be more through testing
* initial version of new odb design to facilitate a channel based ↵Sebastian Thiel2010-06-041-1/+1
| | | | multi-threading implementation of all odb functions
* commit.create_from_tree now uses pure python implementation, fixed message ↵Sebastian Thiel2010-06-031-13/+29
| | | | | | parsing which truncated newlines although it was ilegitimate. Its up to the reader to truncate therse, nowhere in the git code I could find anyone adding newlines to commits where it is written Added performance tests for serialization, it does about 5k commits per second if writing to tmpfs
* commit: redesigned revlist and commit parsing, commits are always retrieved ↵Sebastian Thiel2010-06-021-58/+40
| | | | | | from their object information directly. This is faster, and resolves issues with the rev-list format and empty commit messages Adjusted many tests to go with the changes, as they were still mocked. The mock was removed if necessary and replaced by code that actually executes
* commit: refactored existing code to decode commits from streams - ↵Sebastian Thiel2010-06-021-65/+74
| | | | | | | performance is slightly better git.cmd: added method to provide access to the content stream directly. This is more efficient if large objects are handled, if it is actually used test.helpers: removed unnecessary code
* commit: initial version of commit_from_tree which could create commit ↵Sebastian Thiel2010-06-021-362/+415
| | | | objects if it could serialize itself
* IndexFile.add: Fixed incorrect path handling if path rewriting was desired ↵Sebastian Thiel2010-05-111-2/+2
| | | | | | | | and absolute paths were given Commit.create_from_tree: fixed critical bug that would cause it to create a branch named master by default, instead of the reference actually set ( which is master in many, but not all cases ) - in fact it could be detached as well, we would fail ungracefully although we could assume master then ... although we cant really make the decision Repo.is_dirty: improved its abiility to deal with empty repositories and a missing head. Weird thing is that the test always worked fine with the previous code, but it didn't work for me in a similar situation without this change at least
* Add support for time zone information in tags and commits.Rick Copeland2010-04-271-8/+20
| | | | | | | This commit includes - an update to git.objects.utils:parse_actor_and_date to parse the timezone offset - updates to the git.objects.Commit and git.objects.Tag objects to support *_tz_offset attributes - updates to tests in test.git.test_commit and test.git.test_refs to check for appropriate *_tz_offset attributes
* Converted all tabs to 4 space characters each to comply with pep8Sebastian Thiel2010-03-041-349/+349
|
* Commit.iter_items: Will not restrict comits to the ones containing changes ↵Sebastian Thiel2010-02-281-1/+6
| | | | | | to paths anymore as it will only append '--' if paths are actually given. Added unittest to verify this
* Commit.create: now handles empty repositories correctlySebastian Thiel2010-02-131-2/+15
|
* commit.create_from_tree: head will not be advanced anymore as it feels ↵Sebastian Thiel2009-12-011-1/+1
| | | | non-natural when using it
* objects.utils: Added Traversable base and implemented it for commits ↵Sebastian Thiel2009-11-261-1/+5
| | | | including a test
* commit: added create_from_tree method to untie commit creation from actually ↵Sebastian Thiel2009-11-241-0/+65
| | | | using the current index. This makes it more flexible. For convenience, the index.commit method is still available, it delgates all the work
* Fixed commit.count method which now handles the paths case properly. It ↵Sebastian Thiel2009-11-061-1/+7
| | | | appears git-rev-list uses empty paths in some way, which is quite hard to specify on a shell, but easy if the process is spawned directly
* object: renamed id attribute to sha as it in fact is always being rewritten ↵Sebastian Thiel2009-11-031-13/+13
| | | | as sha, even if the passed in id was a ref. This is done to assure objects are uniquely identified and will compare correctly
* Merge branch 'index' into improvementsSebastian Thiel2009-10-261-15/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 )
| * actor: added __eq__, __ne__ and __hash__ methods including simple testSebastian Thiel2009-10-241-15/+25
| | | | | | | | commit: Fixed long-standing issue during message parsing that would fail to parse properly in case we were created from data. Also it would strip white space from the messages although it shouldn't
* | commit.name_rev property added for convenienceSebastian Thiel2009-10-231-0/+9
|/
* Implemneted IterableLists for refs, commits and remote objects including ↵Sebastian Thiel2009-10-191-0/+1
| | | | simple tests
* commit.count: is an instance method nowSebastian Thiel2009-10-191-10/+3
| | | | | repo: added head , tag and iter_trees methods for completeness changes: headlines now sorted chronologically
* resolved cyclic inclusion issue by moving the Diffable interface into the ↵Sebastian Thiel2009-10-181-1/+1
| | | | diff module, which probably is the right thing to do anyway
* Removed a few diff-related test cases that fail now as the respective method ↵Sebastian Thiel2009-10-171-0/+1
| | | | is missing - these tests have to be redone in test-diff module accordingly
* added Diffable interface to objects.base, its used by Commit and Tree objects.Sebastian Thiel2009-10-161-55/+1
| | | | Diff class has been prepared to process raw input, but its not yet more than a frame
* repo.commit_delta_base: removedSebastian Thiel2009-10-151-75/+78
|
* Added Commit.iter_parents to iterate all parentsSebastian Thiel2009-10-151-10/+32
| | | | | Renamed Commit.commits to iter_commits repo: assured proper use of the terms revision ( rev ) and reference ( ref )
* repo: removed a few methods because of redundancy or because it will be ↵Sebastian Thiel2009-10-151-10/+12
| | | | obsolete once the interface overhaul is finished. This commit is just intermediate
* All times are not stored as time_struct, but as simple int to consume less ↵Sebastian Thiel2009-10-151-22/+9
| | | | | | memory time imports cleaned up and mostly removed as they were not required (anymore)
* test_blob: removed many redundant tests that would fail now as the mock ↵Sebastian Thiel2009-10-141-4/+10
| | | | | | 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-2/+2
| | | | | | | 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
* cmd: added option to return the process directly, allowing to read the ↵Sebastian Thiel2009-10-141-6/+8
| | | | | | | output directly from the output stream commit: now reads commit information directly from the output stream of the process by implementing its iterator method repo: removed log method as it was redundant ( equal to the commits method )
* added Iterable interface to Ref typeSebastian Thiel2009-10-131-1/+1
|
* renamed find_all to list_all, changed commit to use iterable interface in ↵Sebastian Thiel2009-10-131-32/+39
| | | | preparation for command changes
* refs now take repo as first argument and derive from LazyMixin to allow them ↵Sebastian Thiel2009-10-121-1/+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
* renamed from_string and list_from_string to _from_string and ↵Sebastian Thiel2009-10-121-6/+6
| | | | _list_from_string to indicate their new status as private method, adjusted all callers respectively