[PATCH 5 of 8] encode/decode edited commit message
Alexis S. L. Carvalho
alexis at cecm.usp.br
Mon Nov 20 18:19:49 UTC 2006
Thus spake Andrey:
> diff -r ad1e778d48b8 -r e101210ee793 mercurial/ui.py
> --- a/mercurial/ui.py Tue Nov 14 08:30:14 2006 +0600
> +++ b/mercurial/ui.py Mon Nov 13 01:10:14 2006 +0600
> @@ -445,7 +445,7 @@ class ui(object):
> onerr=util.Abort, errprefix=_("edit failed"))
>
> f = open(name)
> - t = f.read()
> + t = self.decode(f.read())
> f.close()
> t = re.sub("(?m)^HG:.*\n", "", t)
> finally:
You really want to abort if you can't decode the text instead of
silently adding a "corrupted" message to the changelog.
Alexis
More information about the Mercurial-devel
mailing list