Mercurial > hgrepos > Python > apps > py-cutils
comparison _postprocess-sdist.py @ 374:c19a21180a8f
Comment
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 05 May 2025 08:53:35 +0200 |
| parents | 2acf206a8fdf |
| children |
comparison
equal
deleted
inserted
replaced
| 373:9cba56c87946 | 374:c19a21180a8f |
|---|---|
| 105 if not sources_txt.endswith(b'\n'): | 105 if not sources_txt.endswith(b'\n'): |
| 106 sf.write(b'\n') | 106 sf.write(b'\n') |
| 107 sf.write(b('\n'.join(new_sources))) | 107 sf.write(b('\n'.join(new_sources))) |
| 108 sources_info.size = len(sf.getvalue()) | 108 sources_info.size = len(sf.getvalue()) |
| 109 sf.seek(0) | 109 sf.seek(0) |
| 110 # | |
| 111 # This adds SOURCES.txt a 2nd time: this effectively overwrites | |
| 112 # the "earlier" one. | |
| 113 # | |
| 110 tf.addfile(sources_info, sf) | 114 tf.addfile(sources_info, sf) |
| 111 | 115 |
| 112 | 116 |
| 113 def b(buf, encoding="ascii"): | 117 def b(buf, encoding="ascii"): |
| 114 if isinstance(buf, bytes): | 118 if isinstance(buf, bytes): |
