How to make `hg diff` show whitespace changes?
Matt Harbison
mharbison72 at gmail.com
Thu Jan 14 03:58:31 UTC 2016
On Wed, 13 Jan 2016 11:03:37 -0500, Noemi Millman
<noemi.millman at backstage.com> wrote:
> Thanks, Matt!
>
> Why would a merge show a file as changed if contents, permissions, line
> endings, etc. haven't changed?
In addition to what Matt said (which is likely the reason for your merge
issue), be aware of resource forks on OS X. Mercurial doesn't track or
handle them, but if a tool adds one, status will say 'M' and diff will
show nothing because the file size changes. You can see if you have them
with `ls -l@`.
They seem to get created with BeyondCompare on 10.6.8, but not on 10.10.
I forget if `hg update -C` removes them, but I'm thinking not since I've
gotten into the habit of manually removing them.
>> On Jan 13, 2016, at 10:53 AM, Matt Mackall <mpm at selenic.com> wrote:
>>
>> On Wed, 2016-01-13 at 07:13 -0800, Noemi wrote:
>>> When I run `hg status`, it shows a few files as changed, but `hg diff`
>>> outputs absolutely nothing. Why might this happen other than
>>> whitespace
>>> changes?
>>
>> Line ending, empty vs deleted, copies, renames, exec bits, merges, etc.
>>
>>> If it is whitespace changes, how can I make `hg diff` display
>>> them? The docs explain how to ignore whitespace changes, but not how
>>> to
>>> make sure they're displayed.
>>
>> They're displayed by default.
>>
>> The standard diff tool was created in 1974. Mercurial was created in
>> 2005. So
>> asking why the diff format doesn't capture all the details is a bit
>> like asking
>> why a VHS (1976) copy of a BluRay (2006) doesn't look as good.
>>
>> We also support the Git format with -g which will show some but not all
>> of the
>> aforementioned differences and also breaks some of the tools that work
>> with
>> standard diffs.
>>
>> --
>> Mathematics is the supreme nostalgia of our time.
>>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> https://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list