D6183: copies: add config option for writing copy metadata to file and/or changset

Yuya Nishihara yuya at tcha.org
Sat Apr 13 07:43:45 EDT 2019


> +def encodecopies(copies):
> +    items = [
> +        '%s\0%s' % (_string_escape(k), _string_escape(copies[k]))
> +        for k in sorted(copies)
> +    ]
> +    return "\n".join(items)

It might be nitpicky, but I think it's better to not embed `\0` into the
extras field. Almost all extras data are texts, and IIRC we regret that
transplant sources are stored in binary form.


More information about the Mercurial-devel mailing list