|
24 | 24 | git_working_dir |
25 | 25 | ) |
26 | 26 |
|
27 | | -importgit.objects |
28 | 27 | importgit.diffasdiff |
29 | 28 |
|
30 | 29 | fromgit.excimport ( |
|
43 | 42 | fromgit.objects.utilimportSerializable |
44 | 43 |
|
45 | 44 | fromgit.utilimport ( |
46 | | -IndexFileSHA1Writer, |
47 | 45 | LazyMixin, |
48 | 46 | LockedFD, |
49 | 47 | join_path_native, |
50 | 48 | file_contents_ro, |
51 | 49 | to_native_path_linux, |
52 | | -to_native_path |
53 | 50 | ) |
54 | 51 |
|
55 | 52 | fromfunimport ( |
@@ -418,9 +415,6 @@ def iter_blobs(self, predicate=lambda t: True): |
418 | 415 | iterator. A default filter, the BlobFilter, allows you to yield blobs |
419 | 416 | only if they match a given list of paths. """ |
420 | 417 | forentryinself.entries.itervalues(): |
421 | | -# TODO: is it necessary to convert the mode ? We did that when adding |
422 | | -# it to the index, right ? |
423 | | -mode=stat_mode_to_index_mode(entry.mode) |
424 | 418 | blob=entry.to_blob(self.repo) |
425 | 419 | blob.size=entry.size |
426 | 420 | output= (entry.stage,blob) |
@@ -602,7 +596,7 @@ def _entries_for_paths(self, paths, path_rewriter, fprogress, entries): |
602 | 596 | defadd(self,items,force=True,fprogress=lambda*args:None,path_rewriter=None, |
603 | 597 | write=True): |
604 | 598 | """Add files from the working tree, specific blobs or BaseIndexEntries |
605 | | - to the index. |
| 599 | + to the index. |
606 | 600 |
|
607 | 601 | :param items: |
608 | 602 | Multiple types of items are supported, types can be mixed within one call. |
@@ -630,7 +624,7 @@ def add(self, items, force=True, fprogress=lambda *args: None, path_rewriter=Non |
630 | 624 | must be a path relative to our repository. |
631 | 625 |
|
632 | 626 | If their sha is null ( 40*0 ), their path must exist in the file system |
633 | | - relative to the git repository as an object will be created from |
| 627 | + relative to the git repository as an object will be created from |
634 | 628 | the data at the path. |
635 | 629 | The handling now very much equals the way string paths are processed, except that |
636 | 630 | the mode you have set will be kept. This allows you to create symlinks |
@@ -892,7 +886,8 @@ def commit(self, message, parent_commits=None, head=True, author=None, committer |
892 | 886 | :return: |
893 | 887 | Commit object representing the new commit""" |
894 | 888 | tree=self.write_tree() |
895 | | -returnCommit.create_from_tree(self.repo,tree,message,parent_commits,head,author=author,committer=committer) |
| 889 | +returnCommit.create_from_tree(self.repo,tree,message,parent_commits, |
| 890 | +head,author=author,committer=committer) |
896 | 891 |
|
897 | 892 | @classmethod |
898 | 893 | def_flush_stdin_and_wait(cls,proc,ignore_stdout=False): |
@@ -995,7 +990,8 @@ def handle_stderr(proc, iter_checked_out_files): |
995 | 990 | iffailed_files: |
996 | 991 | valid_files=list(set(iter_checked_out_files)-set(failed_files)) |
997 | 992 | raiseCheckoutError( |
998 | | -"Some files could not be checked out from the index due to local modifications",failed_files,valid_files,failed_reasons) |
| 993 | +"Some files could not be checked out from the index due to local modifications", |
| 994 | +failed_files,valid_files,failed_reasons) |
999 | 995 | # END stderr handler |
1000 | 996 |
|
1001 | 997 | ifpathsisNone: |
|