[PATCH 2 of 2] commit: if relevant, tell user their commit message was saved

Adrian Buehlmann adrian at cadifra.com
Wed Nov 25 03:56:13 CST 2009


On 25.11.2009 03:09, Greg Ward wrote:
> # HG changeset patch
> # User Greg Ward <greg-hg at gerg.ca>
> # Date 1259114920 18000
> # Branch stable
> # Node ID 3a0f6887a72382ec3fec030c2bd2b0bf6f9895ca
> # Parent  e190a90750c1a83810bc544ad49f805c4968c221
> commit: if relevant, tell user their commit message was saved.
> (issue1635)
> 
> Specifically, if:
>   1) the user edited the message (it didn't come straight from -m) and
>   2) the commit was aborted by an exception
> then the saved commit message in .hg/message could come in handy, so

                                   .hg/last-message.txt

> mention it with a ui.write().
> 
> This doesn't help users who manually rollback to amend a changeset:
> the fact that the message was saved to .hg/last-message.txt is
> invisible in that case.
> 
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py

[snip]


More information about the Mercurial-devel mailing list