aboutsummaryrefslogtreecommitdiff
path: root/lib/git/diff.py
AgeCommit message (Collapse)Author
2010-10-15Adjusted regex to support whitespace - it was a little restrictive ↵Sebastian Thiel
previously, although there was absolutely no need for that. See http://byronimo.lighthouseapp.com/projects/51787/tickets/41-diff-regex-lib_git_diffpy-cannot-handle-paths-with-spaces
2010-09-08replace old reference to Commit.sha with Commit.hexshaRick Copeland
2010-06-29Renamed modules utils to util, and errors to exc to be more conforming to ↵Sebastian Thiel
the submodules's naming conventions
2010-06-29Diff: fixed bug that caused a string to end up as a blob modeSebastian Thiel
2010-06-28All tests adjusted to work with the changed internal sha representationSebastian Thiel
2010-06-25Adjusted all files to (hopefully) deal with the fact that all objects now ↵Sebastian Thiel
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
2010-06-24aggressive_tree_merge: fixed incorrect handling of one branch, it was just ↵Sebastian Thiel
not implemented causing incorrect merge results. Added test to cover this issue Diff: added NULL_BIN_SHA constant for completeness
2010-06-22index.write_tree: initial version implemented, although its not yet working ↵Sebastian Thiel
correctly, a test to explicitly compare the git version with the python implementation is still missing Tree and Index internally use 20 byte shas, converting them only as needed to reduce memory footprint and processing time objects: started own 'fun' module containing the most important tree functions, more are likely to be added soon
2010-05-25diff: by limiting the splitcount to 5, a subtle bug was introduced as the ↵0.2.0-beta1Sebastian Thiel
newline at the end of the split line was not split away automatically. Added test for this, and the trivial fix Wow, at least two people reviewd the code, but it slipped through anyway :)
2010-05-10Handle filenames with embedded spaces when generating diffsRick Copeland
2010-03-04Converted all tabs to 4 space characters each to comply with pep8Sebastian Thiel
2009-11-30SymbolicReference.delete: Now takes SymbolicReference instances as well, not ↵Sebastian Thiel
only paths diff.__str__: fixed incorrect message generation error
2009-11-25diff: added __str__ method to diff classSebastian Thiel
IndexObject._mode_str_to_int: Now uses the 6 relevant bytes of the passed in octal string
2009-11-25index.write_tree: fixed bug that would cause the written tree not to contain ↵Sebastian Thiel
any of our changes entries as it would in fact write a possibly cached tree stored in our extension data.It was solved by simply ignoring that extension data when writing the index for tree creation. A test was added for this as well
2009-11-23diff: fixed issue in diff implementation which would just drop null-shas ↵Sebastian Thiel
that always occour when dealing with working tree diffs ( for ovious reasons ). Also the implementation would previously leave empty blobs where no file actually existed
2009-11-04added query for 'M' modified diffs to DiffIndex including test. The latter ↵Sebastian Thiel
one was made faster by reducing the amount of permutations to the minimal value
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-26cmd.wait: AutoKill wrapped process will automatically raise on errors to ↵Sebastian Thiel
unify error handling amongst clients using the process directly. It might be needed to add a flag allowing to easily override that
2009-10-22Index: Is now diffable and appears to properly implement diffing against ↵Sebastian Thiel
other items as well as the working tree Diff.Diffable: added callback allowing superclasses to preprocess diff arguments Diff.Diff: added eq, ne and hash methods, string methods would be nice
2009-10-18diff method now checks for git-diff errrs that can easily occour if the ↵Sebastian Thiel
repository is bare and if there is no index or second tree specified
2009-10-18DiffIndex implemented including testSebastian Thiel
2009-10-18diff: implemented raw diff parsing which appears to be able to handle ↵Sebastian Thiel
possible input types, DiffIndex still requires implementation though
2009-10-18resolved cyclic inclusion issue by moving the Diffable interface into the ↵Sebastian Thiel
diff module, which probably is the right thing to do anyway
2009-10-16added Diffable interface to objects.base, its used by Commit and Tree objects.Sebastian Thiel
Diff class has been prepared to process raw input, but its not yet more than a frame
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-12Reorganized package structure and cleaned up importsSebastian Thiel
2009-10-11Fixed remaining tests to deal with the changesSebastian Thiel
mode is now generally an int compatible to the stat module
2009-10-11commit: fixed failing commit tests as the mocked git command would always ↵Sebastian Thiel
return the same thing which does not work anymore - re-implemented it in a more dynamic manner, but in the end tests will have to be revised anyway Added slots to Diff and Stats type respectively
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-09diff regex are now precompiled on class level, renamed a|b_blob to ↵Sebastian Thiel
a|b_blob_id as it better reflects the actual value actor regex now precompiled on class level blob regex now precompiled on class level; made blame method more readable and faster although it can still be improved by making assumptions about the blame format and by reading the git command stream directly ( which is a general issue right now )
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-10-08Fixed Diff class which used Commits instead of Blobs - as Blobs contain the ↵Sebastian Thiel
path ( in the 'name' member variable ), the a|b_path members of Diff have been removed. Tests were adjusted and run Diff docs have been updated to provide a little more information on specifics cases
2009-01-24Lots of spring cleaning and added in Sphinx documentation.Michael Trier
2008-12-15Added in new properties Diff.renamed, Diff.rename_from, and Diff.rename_toMichael Trier
2008-12-15add support for parsing rename info to the diff parserPaul Sowden
Currently the parsed headers are just ignored but I'll add them to the Diff object in a future commit (cherry picked from commit 711b655f29b42821c51be8e592143c7db31ed140)
2008-12-15implement a far far faster diff parserPaul Sowden
The old diff parser in list_from_string took a large amount of time to parse long diffs, on one of my repositories it took over 3 minutes to parse the initial commit. The new parser uses a single regexp to match the header of a diff, and iterates over the each individual diff by splitting the entire string by the diff seperator, attempting to match the header for each individual diff. With the new parser parsing the same repository is almost instant, woohoo! (cherry picked from commit 5b6b27f153bdc30380bea12a528ef483571dd57a)
2008-09-05Fix unneeded dict unpacking.Steve Frécinaux
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.