summaryrefslogtreecommitdiff
path: root/lib/git/repo.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed implementation after design change to deal with it - all tests run, ↵Sebastian Thiel2010-06-041-1/+1
| | | | but next there will have to be more through testing
* db: implemented GitObjectDB using the git command to make sure we can lookup ↵Sebastian Thiel2010-06-041-3/+8
| | | | everything. Next is to implement pack-file reading, then alternates which should allow to resolve everything
* commit.create_from_tree now uses pure python implementation, fixed message ↵Sebastian Thiel2010-06-031-22/+21
| | | | | | 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
* Repo: Added comparison operators and hash operator including testSebastian Thiel2010-05-121-0/+16
| | | | Cmd: AutoInterrupt handles boundary cases more gracefully as it can be that the os module suddenly becomes None if the interpreter is going down
* IndexFile.add: Fixed incorrect path handling if path rewriting was desired ↵Sebastian Thiel2010-05-111-1/+1
| | | | | | | | 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
* repo: added test with some basic assertions for empty repositories theseSebastian Thiel2010-05-101-1/+2
| | | | | | | | 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
* Added additional tz_offset testing in performance test to call it more often.Sebastian Thiel2010-04-301-1/+1
| | | | Fixed test which required to be on master to work - it now uses the HEAD symbolic ref instead.
* Converted all tabs to 4 space characters each to comply with pep8Sebastian Thiel2010-03-041-761/+761
|
* IndexFile: unmerged_blobs lists are now sortedSebastian Thiel2010-02-131-1/+2
| | | | Repo.init: fixed incorrect use of the path which was to optionally specify where to initialize the repository. Update test as well
* repo: Added alias for refs property, which is called 'references' , to ↵Sebastian Thiel2009-12-091-2/+5
| | | | improve usability. There was no reason that only 'refs' is shortened, whereas there are 'heads' and 'tags' as well
* repo: renamed directories to more descriptive identifiers and made them ↵Sebastian Thiel2009-12-031-19/+45
| | | | safer to use in case of bare repositories
* repo: fixed incorrect path handling thta could lead to issues if the ↵Sebastian Thiel2009-12-031-4/+9
| | | | repository was initialized with a .git repository, although it was not bare actually
* repo: may now be initialized from a path with envrionment variables. ↵Sebastian Thiel2009-11-101-2/+4
| | | | Previously it would consider such a path a relative one and handle it incorrectly
* repo.clone: Added plenty of special handling to allow drive letters to work ↵Sebastian Thiel2009-11-051-1/+32
| | | | | | as expected. Its quite terrible to see a two-line method inflate to 20 as there is no git-daemon on windows, some tests will not work. The error message has been adjusted to be more precise for the poor people trying to run the tests on windows ( including myself )
* Improved cmd error handling in case an invalid revision is specified for an ↵Sebastian Thiel2009-11-041-26/+13
| | | | | | object repo.tree: improved to be less restricting
* object: renamed id attribute to sha as it in fact is always being rewritten ↵Sebastian Thiel2009-11-031-1/+1
| | | | as sha, even if the passed in id was a ref. This is done to assure objects are uniquely identified and will compare correctly
* repo: added create_* and delete_* methods for refs ( head, tag, remote ) as ↵Sebastian Thiel2009-11-031-0/+55
| | | | a convenient shortcut to using the classes manually
* repo.is_dirty: is a method now - the property based interface didn't allow ↵Sebastian Thiel2009-11-031-1/+0
| | | | all parameters to be used. The test would not test everything either, and I would consider this a bug that slipped through
* Another attempt to make fetch emit progress information, but in fact its ↵Sebastian Thiel2009-10-281-1/+1
| | | | proven now that this is not happening if stderr is being redirected. A test is in place that will most likely fail in case this ever changes
* Added repo.refs for completeness (as remote.refs is there as well and quite ↵Sebastian Thiel2009-10-281-0/+10
| | | | nice to use)
* Added repo.index property including simple test, and additional ideas in the ↵Sebastian Thiel2009-10-231-0/+9
| | | | TODO list
* Added SymbolicReference and HEAD type to better represent these special ↵Sebastian Thiel2009-10-221-8/+4
| | | | | | | | types of references and allow special handling Head.reset now is an instance method of HEAD type Concatenated all reference specific tests into test_refs started to fix tests breaking now because of changed interface
* Git.cmd: removed with_raw_output optionSebastian Thiel2009-10-221-14/+5
| | | | | repo.archive: made it work with new way of custom output streams added test for repo.archive which was missing for some reason
* repo.is_dirty: fixed incorrect check of a dirty working tree, previously it ↵Sebastian Thiel2009-10-211-1/+3
| | | | would compare HEAD against the working tree, not the index which was intended
* touch method improved to open for appending which would not clear the file ↵Sebastian Thiel2009-10-211-1/+1
| | | | and be like an actual touch
* repo.alternates test cheked for correctness and bugfixed - totally mocked ↵Sebastian Thiel2009-10-201-6/+10
| | | | tests bare the risk that things do not work properly outside of the sandbox.
* Added slots to Repo type to be sure we do not accidentally set values on it, ↵Sebastian Thiel2009-10-201-0/+1
| | | | | | and to be more efficient of course ;) TODO: Added info about possible config improvement
* Fixed bare repository handling - bare is now a property to prevent writing itSebastian Thiel2009-10-201-8/+34
|
* Moved specialized methods like dashify, touch and is_git_dir to module to ↵Sebastian Thiel2009-10-201-1/+17
| | | | | | the respective modules that use them fixed repo.daemon_export which did not work anymore due to incorrect touch implementation and wrong property names
* Improved is_dirty including testSebastian Thiel2009-10-201-10/+20
|
* Implemneted IterableLists for refs, commits and remote objects including ↵Sebastian Thiel2009-10-191-7/+6
| | | | simple tests
* commit.count: is an instance method nowSebastian Thiel2009-10-191-13/+34
| | | | | repo: added head , tag and iter_trees methods for completeness changes: headlines now sorted chronologically
* repo.remote method addedSebastian Thiel2009-10-191-0/+14
| | | | CHANGES updated to carry information about remotes and config
* Added configuration access including tests to remoteSebastian Thiel2009-10-191-1/+1
| | | | | config: fixed issue that would cause it to abort reading if the file did not exist - this is valid now Test does not work as the configuration parsing does not work as expected - this must be fixed first
* Added remote module and test cases - about to implement remote option handlingSebastian Thiel2009-10-191-0/+8
|
* Added frame for configuration reader involving a meta class, decorators and ↵Sebastian Thiel2009-10-181-1/+52
| | | | tests - most of which still has to be filled out
* repo: fixed untracked files function which used git-commit before, it can ↵Sebastian Thiel2009-10-181-1/+1
| | | | open vim to get a message though which makes the program appear to freeze - using git-status now
* Fixed object bug that would cause object ids not to be resolved to sha's as ↵Sebastian Thiel2009-10-161-28/+10
| | | | | | this was assumed - now there is a test for it as well repo: removed diff and commit_diff methods, added 'head' property returning the current head as Reference object
* repo.untracked_files added including testSebastian Thiel2009-10-161-0/+31
|
* Improved archive function by allowing it to directly write to an output ↵Sebastian Thiel2009-10-151-42/+25
| | | | | | stream - previously it would cache everything to memory and try to provide zipping functionality itself gitcmd: allows the output stream to be set explicitly which is mainly useful for archiving operations
* repo: made init and clone methods less specific, previously they wanted to ↵Sebastian Thiel2009-10-151-15/+15
| | | | do it 'barely' only. New method names closely follow the default git command names
* repo.commit_delta_base: removedSebastian Thiel2009-10-151-14/+0
|
* Object can now create objects of the proper type in case one attempts to ↵Sebastian Thiel2009-10-151-4/+2
| | | | create an object directly - this feature is used in several places now, allowing for additional type-checking
* repo: removed commits_between but added a note about how this can be ↵Sebastian Thiel2009-10-151-218/+206
| | | | achieved using the iter_commits method; reorganized methods within the type as a start for more interface changes
* Added Commit.iter_parents to iterate all parentsSebastian Thiel2009-10-151-66/+54
| | | | | 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-54/+22
| | | | 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-5/+6
| | | | | | memory time imports cleaned up and mostly removed as they were not required (anymore)
* test_performance: module containing benchmarks to get an idea of the ↵Sebastian Thiel2009-10-151-3/+6
| | | | | | | achieved throughput repo.commits: max_count is None by default moved benchmark-like test from test_commit to test_performance
* tree: now reads tress directly by parsing the binary data, allowing it to ↵Sebastian Thiel2009-10-141-4/+12
| | | | safe possibly hundreds of command calls
* cmd: added option to return the process directly, allowing to read the ↵Sebastian Thiel2009-10-141-20/+0
| | | | | | | 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 )