New upstream version 3.1.3
TANIGUCHI Takaki
3 years ago
0 | 0 | Metadata-Version: 1.2 |
1 | 1 | Name: GitPython |
2 | Version: 3.1.2 | |
2 | Version: 3.1.3 | |
3 | 3 | Summary: Python Git Library |
4 | 4 | Home-page: https://github.com/gitpython-developers/GitPython |
5 | 5 | Author: Sebastian Thiel, Michael Trier |
0 | 0 | Metadata-Version: 1.2 |
1 | 1 | Name: GitPython |
2 | Version: 3.1.2 | |
2 | Version: 3.1.3 | |
3 | 3 | Summary: Python Git Library |
4 | 4 | Home-page: https://github.com/gitpython-developers/GitPython |
5 | 5 | Author: Sebastian Thiel, Michael Trier |
0 | 0 | ========= |
1 | 1 | Changelog |
2 | 2 | ========= |
3 | ||
4 | 3.1.3 | |
5 | ===== | |
6 | ||
7 | See the following for details: | |
8 | https://github.com/gitpython-developers/gitpython/milestone/38?closed=1* | |
3 | 9 | |
4 | 10 | 3.1.2 |
5 | 11 | ===== |
11 | 11 | import os.path as osp |
12 | 12 | |
13 | 13 | |
14 | __version__ = '3.1.2' | |
14 | __version__ = '3.1.3' | |
15 | 15 | |
16 | 16 | |
17 | 17 | #{ Initialization |
18 | 18 | def _init_externals(): |
19 | 19 | """Initialize external projects by putting them into the path""" |
20 | if __version__ == '3.1.2' and 'PYOXIDIZER' not in os.environ: | |
20 | if __version__ == '3.1.3' and 'PYOXIDIZER' not in os.environ: | |
21 | 21 | sys.path.insert(0, osp.join(osp.dirname(__file__), 'ext', 'gitdb')) |
22 | 22 | |
23 | 23 | try: |
462 | 462 | for stage, blob in self.iter_blobs(is_unmerged_blob): |
463 | 463 | path_map.setdefault(blob.path, []).append((stage, blob)) |
464 | 464 | # END for each unmerged blob |
465 | for l in path_map.values(): | |
466 | l.sort() | |
465 | for line in path_map.values(): | |
466 | line.sort() | |
467 | 467 | return path_map |
468 | 468 | |
469 | 469 | @classmethod |
465 | 465 | # write-binary is required, otherwise windows will |
466 | 466 | # open the file in text mode and change LF to CRLF ! |
467 | 467 | with open(pack_file_path, 'wb') as fd: |
468 | fd.writelines(l.encode(defenc) for l in new_lines) | |
468 | fd.writelines(line.encode(defenc) for line in new_lines) | |
469 | 469 | |
470 | 470 | except (OSError, IOError): |
471 | 471 | pass # it didn't exist at all |
685 | 685 | |
686 | 686 | # read head information |
687 | 687 | with open(osp.join(self.repo.common_dir, 'FETCH_HEAD'), 'rb') as fp: |
688 | fetch_head_info = [l.decode(defenc) for l in fp.readlines()] | |
688 | fetch_head_info = [line.decode(defenc) for line in fp.readlines()] | |
689 | 689 | |
690 | 690 | l_fil = len(fetch_info_lines) |
691 | 691 | l_fhi = len(fetch_head_info) |
704 | 704 | # end truncate correct list |
705 | 705 | # end sanity check + sanitization |
706 | 706 | |
707 | output.extend(FetchInfo._from_line(self.repo, err_line, fetch_line) | |
708 | for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info)) | |
707 | for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info): | |
708 | try: | |
709 | output.append(FetchInfo._from_line(self.repo, err_line, fetch_line)) | |
710 | except ValueError as exc: | |
711 | log.debug("Caught error while parsing line: %s", exc) | |
712 | log.warning("Git informed while fetching: %s", err_line.strip()) | |
709 | 713 | return output |
710 | 714 | |
711 | 715 | def _get_push_info(self, proc, progress): |
839 | 843 | If the push contains rejected heads, these will have the PushInfo.ERROR bit set |
840 | 844 | in their flags. |
841 | 845 | If the operation fails completely, the length of the returned IterableList will |
842 | be null.""" | |
846 | be 0.""" | |
843 | 847 | kwargs = add_progress(kwargs, self.repo.git, progress) |
844 | 848 | proc = self.repo.git.push(self, refspec, porcelain=True, as_process=True, |
845 | 849 | universal_newlines=True, **kwargs) |
211 | 211 | assert unmerged_blob_map |
212 | 212 | |
213 | 213 | # pick the first blob at the first stage we find and use it as resolved version |
214 | three_way_index.resolve_blobs(l[0][1] for l in unmerged_blob_map.values()) | |
214 | three_way_index.resolve_blobs(line[0][1] for line in unmerged_blob_map.values()) | |
215 | 215 | tree = three_way_index.write_tree() |
216 | 216 | assert isinstance(tree, Tree) |
217 | 217 | num_blobs = 0 |