Codebase list python-git / 019fa9c
New upstream version 3.1.3 TANIGUCHI Takaki 3 years ago
9 changed file(s) with 23 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
00 Metadata-Version: 1.2
11 Name: GitPython
2 Version: 3.1.2
2 Version: 3.1.3
33 Summary: Python Git Library
44 Home-page: https://github.com/gitpython-developers/GitPython
55 Author: Sebastian Thiel, Michael Trier
00 Metadata-Version: 1.2
11 Name: GitPython
2 Version: 3.1.2
2 Version: 3.1.3
33 Summary: Python Git Library
44 Home-page: https://github.com/gitpython-developers/GitPython
55 Author: Sebastian Thiel, Michael Trier
0 3.1.2
0 3.1.3
00 =========
11 Changelog
22 =========
3
4 3.1.3
5 =====
6
7 See the following for details:
8 https://github.com/gitpython-developers/gitpython/milestone/38?closed=1*
39
410 3.1.2
511 =====
1111 import os.path as osp
1212
1313
14 __version__ = '3.1.2'
14 __version__ = '3.1.3'
1515
1616
1717 #{ Initialization
1818 def _init_externals():
1919 """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:
2121 sys.path.insert(0, osp.join(osp.dirname(__file__), 'ext', 'gitdb'))
2222
2323 try:
462462 for stage, blob in self.iter_blobs(is_unmerged_blob):
463463 path_map.setdefault(blob.path, []).append((stage, blob))
464464 # 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()
467467 return path_map
468468
469469 @classmethod
465465 # write-binary is required, otherwise windows will
466466 # open the file in text mode and change LF to CRLF !
467467 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)
469469
470470 except (OSError, IOError):
471471 pass # it didn't exist at all
685685
686686 # read head information
687687 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()]
689689
690690 l_fil = len(fetch_info_lines)
691691 l_fhi = len(fetch_head_info)
704704 # end truncate correct list
705705 # end sanity check + sanitization
706706
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())
709713 return output
710714
711715 def _get_push_info(self, proc, progress):
839843 If the push contains rejected heads, these will have the PushInfo.ERROR bit set
840844 in their flags.
841845 If the operation fails completely, the length of the returned IterableList will
842 be null."""
846 be 0."""
843847 kwargs = add_progress(kwargs, self.repo.git, progress)
844848 proc = self.repo.git.push(self, refspec, porcelain=True, as_process=True,
845849 universal_newlines=True, **kwargs)
211211 assert unmerged_blob_map
212212
213213 # 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())
215215 tree = three_way_index.write_tree()
216216 assert isinstance(tree, Tree)
217217 num_blobs = 0