clear 'frozen: ...' comment if autoupdate unfreezes

This commit is contained in:
Anthony Sottile 2020-01-01 20:21:42 -08:00
parent cd57ba90f5
commit 35caf115f8
2 changed files with 9 additions and 2 deletions

View file

@ -108,7 +108,9 @@ def _write_new_config(path, rev_infos):
new_rev_s = ordered_dump({'rev': rev_info.rev}, **C.YAML_DUMP_KWARGS)
new_rev = new_rev_s.split(':', 1)[1].strip()
if rev_info.frozen is not None:
comment = ' # {}'.format(rev_info.frozen)
comment = ' # frozen: {}'.format(rev_info.frozen)
elif match.group(4).strip().startswith('# frozen:'):
comment = ''
else:
comment = match.group(4)
lines[idx] = REV_LINE_FMT.format(