[PATCH] diffstat: fix parsing of filenames

Gastón Kleiman gaston.kleiman at gmail.com
Tue Feb 1 20:39:57 UTC 2011


On Tue, Feb 1, 2011 at 17:26, Gastón Kleiman <gaston.kleiman at gmail.com> wrote:
> On Tue, Feb 1, 2011 at 17:07, Matt Mackall <mpm at selenic.com> wrote:
>> On Tue, 2011-02-01 at 15:39 -0300, Gastón Kleiman wrote:
>>> # HG changeset patch
>>> # User Gastón Kleiman <gaston.kleiman at gmail.com>
>>> # Date 1296582352 10800
>>> # Branch stable
>>> # Node ID 0f59f053726484df622651a51c18309f700404b2
>>> # Parent  a939f08fae9c4a51cc9bf4b3d9c512703856df84
>>> diffstat: fix parsing of filenames
>>>
>>> This patch fixes the parsing of filenames which contain spaces.
>>
>> It'd be massively helpful if you told us what precisely you think was
>> wrong, preferably with before and after examples. For all I can tell
>> from your description, whatever you're fixing may actually have been
>> that way intentionally.
>
> I've included some tests in the patch, but you are right that the
> description wasn't verbose enough.
>
> The current stable version of Mercurial has the following behavior:
> [...]
>
> I hope that this description is complete enough, but just tell me if
> you need something else =)

I also forgot to mention that without applying my patch, if one commit
message starts with 'diff', the diffstat generated by 'hg email' is
incorrect:

----

$ hg email -d --test tip
This patch series consists of 1 patches.

diffstat: fix parsing of filenames

This patch fixes  the parsing of filenames which contain spaces. It also fixes

[...]

 filenames             |    0
 mercurial/patch.py    |    6 ++++--
 tests/test-diffstat.t |   17 +++++++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

does the diffstat above look okay? [y]:

------

'filenames' is included in the diffstat, but the change actually
doesn't touch any file called 'filenames'. So 'filenames' comes from
the commit message and not from an real change.

--
Gastón Kleiman



More information about the Mercurial-devel mailing list