Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/svn/ra.py
Show All 30 Lines | Args: | ||||
line_ending (str): The line ending format as defined for | line_ending (str): The line ending format as defined for | ||||
svn:eol-style property. Acceptable values are 'native', | svn:eol-style property. Acceptable values are 'native', | ||||
'CRLF', 'LF' and 'CR' | 'CRLF', 'LF' and 'CR' | ||||
Returns: | Returns: | ||||
bytes: lines with endings normalized | bytes: lines with endings normalized | ||||
""" | """ | ||||
if eol_style in _eol_style: | |||||
lines = lines.replace(_eol_style["CRLF"], _eol_style["LF"]).replace( | lines = lines.replace(_eol_style["CRLF"], _eol_style["LF"]).replace( | ||||
_eol_style["CR"], _eol_style["LF"] | _eol_style["CR"], _eol_style["LF"] | ||||
) | ) | ||||
if _eol_style[eol_style] != _eol_style["LF"]: | if _eol_style[eol_style] != _eol_style["LF"]: | ||||
vlorentz: why do we do this at all, anyway? | |||||
Done Inline Actionsanlambert: T570#22072 | |||||
Not Done Inline Actionspffffffff Could you add a comment in the code to link to that explanation? (or even copy all of it for future-proofing) vlorentz: pffffffff
Could you add a comment in the code to link to that explanation?
(or even copy all… | |||||
Done Inline Actions
yeah, subversion ...
There is already one here. anlambert: > pffffffff
yeah, subversion ...
> Could you add a comment in the code to link to that… | |||||
lines = lines.replace(_eol_style["LF"], _eol_style[eol_style]) | lines = lines.replace(_eol_style["LF"], _eol_style[eol_style]) | ||||
return lines | return lines | ||||
def apply_txdelta_handler(sbuf, target_stream): | def apply_txdelta_handler(sbuf, target_stream): | ||||
"""Return a function that can be called repeatedly with txdelta windows. | """Return a function that can be called repeatedly with txdelta windows. | ||||
When done, closes the target_stream. | When done, closes the target_stream. | ||||
▲ Show 20 Lines • Show All 490 Lines • Show Last 20 Lines |
why do we do this at all, anyway?