|
20 | 20 | SymbolicReference,
|
21 | 21 | TagReference
|
22 | 22 | )
|
23 |
| - |
24 |
| - |
25 | 23 | fromgit.utilimport (
|
26 | 24 | LazyMixin,
|
27 | 25 | Iterable,
|
|
35 | 33 | fromgit.cmdimporthandle_process_output
|
36 | 34 | fromgitdb.utilimportjoin
|
37 | 35 | fromgit.compatimportdefenc
|
| 36 | +importlogging |
| 37 | + |
| 38 | +log=logging.getLogger('git.remote') |
38 | 39 |
|
39 | 40 |
|
40 | 41 | __all__= ('RemoteProgress','PushInfo','FetchInfo','Remote')
|
@@ -570,10 +571,16 @@ def _get_fetch_info_from_stderr(self, proc, progress):
|
570 | 571 | fetch_head_info= [l.decode(defenc)forlinfp.readlines()]
|
571 | 572 | fp.close()
|
572 | 573 |
|
573 |
| -# NOTE: We assume to fetch at least enough progress lines to allow matching each fetch head line with it. |
574 | 574 | l_fil=len(fetch_info_lines)
|
575 | 575 | l_fhi=len(fetch_head_info)
|
576 |
| -assertl_fil>=l_fhi,"len(%s) <= len(%s)"% (l_fil,l_fhi) |
| 576 | +ifl_fil>=l_fhi: |
| 577 | +msg="Fetch head does not contain enough lines to match with progress information\n" |
| 578 | +msg+="length of progress lines %i should be equal to lines in FETCH_HEAD file %i\n" |
| 579 | +msg+="Will ignore extra progress lines." |
| 580 | +msg%= (l_fil,l_fhi) |
| 581 | +log.warn(msg) |
| 582 | +fetch_info_lines=fetch_info_lines[:l_fhi] |
| 583 | +# end sanity check + sanitization |
577 | 584 |
|
578 | 585 | output.extend(FetchInfo._from_line(self.repo,err_line,fetch_line)
|
579 | 586 | forerr_line,fetch_lineinzip(fetch_info_lines,fetch_head_info))
|
|