summaryrefslogtreecommitdiff
path: root/lib/git/index.py
Commit message (Collapse)AuthorAgeFilesLines
* index: split index file into multiple files of a single package. This didn't ↵Sebastian Thiel2010-06-141-1435/+0
| | | | reduce the file size as much as I would have liked, but certainly is a start for further 'outsourcing'
* initial version of loose object writing and simple cached object lookup ↵Sebastian Thiel2010-06-021-2/+2
| | | | appears to be working
* index: index-add fixed to always append a newline after each item. In git ↵Sebastian Thiel2010-05-261-23/+10
| | | | | | has unified its way it reads from stdin, now it wants all items to be terminated by a newline usually. Previously, it could have been that it really didn't want to have a termination character when the last item was written to the file. Bumped the minimum requirements to 1.7.0 to be sure it is working as I think it will. Still, I have to admit that sometime it just appears the closed pipe will not stop git from waiting for more input, at least with the previous implementation
* IndexFile.add: Fixed incorrect path handling if path rewriting was desired ↵Sebastian Thiel2010-05-111-6/+7
| | | | | | | | 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
* index.add: added index path rewrite functionality, which allows to store a ↵Sebastian Thiel2010-05-101-1343/+1402
| | | | | | | different path in the index than the actual one on disk ( from which the object will be created ) Fixed bug the way newlines were handled, which hopefully fixes occasional hangs as well. It works fine with git 1.7.1 Most of the changes are due to the tab-space conversion - its weird once more as I thought it was all in spaces before ... .
* repo: added test with some basic assertions for empty repositories theseSebastian Thiel2010-05-101-1328/+1335
| | | | | | | | repo.is_dirty: Will not fail on empty repo ( anymore ) index.entries: will just be empty if the repository is empty refs: added to_full_path method which can be used to create fully synthetic instances of Reference types, added a test for it Converted all touched files to spaces, which is why git reports so many changed files. Actually I was thinking every file would use spaces, but apparently not
* Index: handling an AttributeError exception raised in python 2.6.5 and newer ↵Sebastian Thiel2010-05-041-3/+12
| | | | if an unset slot is being deleted.
* Converted all tabs to 4 space characters each to comply with pep8Sebastian Thiel2010-03-041-1322/+1322
|
* IndexFile.write: Added special handling flag allowing to skip TREE extension ↵Sebastian Thiel2010-02-241-17/+27
| | | | data, which becomes important if git-write-tree is supposed to be used
* index: added move method including testSebastian Thiel2010-02-191-11/+88
| | | | test.helpers: temporary rw repository creators now set the working dir of the program, easing working with relative paths a lot
* git.commit: Added test to assure we handle the first commit correctly ↵Sebastian Thiel2010-02-181-1/+1
| | | | regarding its parents
* IndexFile: unmerged_blobs lists are now sortedSebastian Thiel2010-02-131-3/+4
| | | | Repo.init: fixed incorrect use of the path which was to optionally specify where to initialize the repository. Update test as well
* Added imports for standard locking file classes into the git moduleSebastian Thiel2009-12-161-1/+2
|
* index: improved the way stdout is handled as the previous handling rarely ↵Sebastian Thiel2009-12-151-5/+8
| | | | | | caused lockups while waiting for stdout NOTE: This does not have the desired effect, the issue appears to be somewhere within git, possibly, as git simply does not terminate waiting for something, even if stdout is closed.
* removed nonsense IndexLock implementationSebastian Thiel2009-12-101-32/+1
|
* index: IndexLock added to provide some kind of critical section for index ↵Sebastian Thiel2009-12-101-1/+33
| | | | based git operations in concurrent environments
* index: TempFileMover now handles the case that the file to move does not ↵Sebastian Thiel2009-12-101-4/+11
| | | | | | exist more gracefully Added BlockingLockFile which may be used to wait for the lock according to some criteria
* index: Checkout exception now contains information about the reason of the ↵Sebastian Thiel2009-12-071-2/+10
| | | | failure as well, one per failed file
* repo: renamed directories to more descriptive identifiers and made them ↵Sebastian Thiel2009-12-031-7/+7
| | | | safer to use in case of bare repositories
* index: Added BlobFilter utility class to make filtering of blobs from the ↵Sebastian Thiel2009-11-301-2/+27
| | | | index easier
* SymbolicReferences can now be at any path within the repository, there is no ↵Sebastian Thiel2009-11-261-4/+2
| | | | | | restriction anymore. Added a test to assure the git commands can handle it
* index.write_tree: fixed bug that would cause the written tree not to contain ↵Sebastian Thiel2009-11-251-1/+19
| | | | 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
* PushInfo: added summary field to help providing user readable informationSebastian Thiel2009-11-241-1/+1
| | | | Index.checkout: fixed bug in exception creator function
* commit: added create_from_tree method to untie commit creation from actually ↵Sebastian Thiel2009-11-241-49/+4
| | | | using the current index. This makes it more flexible. For convenience, the index.commit method is still available, it delgates all the work
* index.merge_tree function added including test.Sebastian Thiel2009-11-241-5/+50
| | | | index.write_tree may now use the missing_ok argument which writes trees faster and allows you to operate without objects to do a true index based merge
* diff: fixed issue in diff implementation which would just drop null-shas ↵Sebastian Thiel2009-11-231-1/+1
| | | | 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
* index.checkout: improved handling of errors as the thrown exception contains ↵Sebastian Thiel2009-11-231-20/+61
| | | | | | exact information about the successfully checked out files as well as the failed ones Return value of the method is an iterator to all checked out files
* index.checkout: improved parsing of stderr to properly handle more unusual ↵Sebastian Thiel2009-11-231-2/+9
| | | | messages - previously it would be more narrow and raise a GitCommandError in cases where it wasnt actually needed
* index.checkout: Now parsing stderror in the end to determine which files ↵Sebastian Thiel2009-11-231-14/+69
| | | | have not been updated as they where modified locally or did not exist. Test was improved to check for this new case.
* index.checkout: Added progress function and made adjustments to testSebastian Thiel2009-11-221-73/+74
|
* index: Path expansion routine is now iterator which assures more timely ↵Sebastian Thiel2009-11-211-16/+12
| | | | processing - delays could have been possible previously as it would expand (possibly) large amounts of paths in advance
* index.add: adjusted code to deal with update-index stdout 'bug' - now the ↵Sebastian Thiel2009-11-211-10/+14
| | | | code does not rely on my own git patch anymore as it is unsure whether it will make it in there or when
* index.add: added progress function support and made sure progress is sent ↵Sebastian Thiel2009-11-201-21/+121
| | | | | | just in time This adds a dependency to a git update index fix - and I hope it will be put in in time ( including windows version )
* index: Added IndexEntry.from_base method including test in conjunction with ↵Sebastian Thiel2009-11-181-2/+28
| | | | | | symlinks. Added index.get_entries_key method to allow direct access to anyone willing to do so
* ARGH: wb and rb is not the same as r and w on windows, hence reading of ↵Sebastian Thiel2009-11-051-6/+12
| | | | binary files went crazy as well as binary writing
* Added utilities helping to create proper paths either with slashes or ↵Sebastian Thiel2009-11-051-3/+3
| | | | | | | backslashes depending on the operating system fixed test_refs and test_trees Many more issues remain though, this is just a first backup commit
* added all new files to reference.rst and corrected the worst mistakes. There ↵Sebastian Thiel2009-11-041-4/+5
| | | | are still a few errors left that I cannot fix as it complains about whitespace in the end ... that is exactly what I hate restructured text for, its just a ... anyway.
* object: renamed id attribute to sha as it in fact is always being rewritten ↵Sebastian Thiel2009-11-031-2/+2
| | | | 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.add: Finished implemenation including through testsSebastian Thiel2009-10-261-4/+142
| | | | index.checkout: added simple method allowing to checkout files from the index, including simple test
* added head kwarg to reset and commit method, allowing to automatically ↵Sebastian Thiel2009-10-261-10/+29
| | | | change the head to the given commit, which makes the methods more versatile
* index.commit: implemented initial version, but in fact some more changes are ↵Sebastian Thiel2009-10-241-9/+35
| | | | required to have a nice API. Tests are not yet fully done either
* index.remove implemented including throrough testSebastian Thiel2009-10-231-21/+131
|
* Implemented index.reset method including testSebastian Thiel2009-10-231-4/+16
|
* IndexEntry is now based on a 'minimal' version that is suitable to be fed ↵Sebastian Thiel2009-10-231-52/+69
| | | | 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 frame for IndexFile add/remove/commit methods and respective test markersSebastian Thiel2009-10-231-4/+114
|
* Added repo.index property including simple test, and additional ideas in the ↵Sebastian Thiel2009-10-231-2/+6
| | | | TODO list
* Renamed Index to IndexFile, adjusted tests, it will only operate on physical ↵Sebastian Thiel2009-10-231-101/+49
| | | | files, not on streams, as Indices are not streamed by any git command ( at least not in raw format )
* Index: Is now diffable and appears to properly implement diffing against ↵Sebastian Thiel2009-10-221-4/+68
| | | | | | | 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
* default index writing now writes the index of the current repository in a ↵Sebastian Thiel2009-10-221-6/+21
| | | | fashion comparable to the native implementation
* Index now behaves more like the default index if no explicit stream is ↵Sebastian Thiel2009-10-221-8/+21
| | | | given. It will lazily read its data on first access