[petsc-dev] File modes

Jed Brown jedbrown at mcs.anl.gov
Fri Jan 6 16:17:52 CST 2012


On Fri, Jan 6, 2012 at 16:14, Mark F. Adams <mark.adams at columbia.edu> wrote:

> I fear disagreeing wit you :) but:
>
> ford:~/petsc-dev/src/ksp/pc/impls/gamg> ll
> total 132
> -rw-r--r-- 1 madams anag   374 2011-11-02 14:11 makefile
> -rw-r--r-- 1 madams anag  1465 2011-12-31 15:11 gamg.h
> -rwxr-xr-x 1 madams anag 49319 2012-01-06 12:49 gamg.c
> -rw-r--r-- 1 madams anag 70733 2012-01-06 12:49 createProlongation.c
> drwxr-xr-x 2 madams anag    35 2012-01-06 12:51 ftn-auto
> ford:~/petsc-dev/src/ksp/pc/impls/gamg> hg diff
> ford:~/petsc-dev/src/ksp/pc/impls/gamg> hg diff .
> ford:~/petsc-dev/src/ksp/pc/impls/gamg>
>
> As you can see I made gamg.c executable but it does not show up ...
>

Oh my! I consider this a bug in mercurial, but I guess the problem is that
it isn't representable in the language of plain "patch". Please, everyone,
edit your ~/.hgrc and add the following two lines:

[diff]
git = True


With this,

$ chmod +x ex5.c
$ hg diff
diff --git a/src/snes/examples/tutorials/ex5.c
b/src/snes/examples/tutorials/ex5.c
old mode 100644
new mode 100755


Thanks for pointing this out.

>
>
> On Jan 6, 2012, at 5:08 PM, Jed Brown wrote:
>
> On Fri, Jan 6, 2012 at 16:09, Mark F. Adams <mark.adams at columbia.edu>wrote:
>
>> Whoops sorry about that.  I do usually use diff but diff does not seem to
>> show the mode ...
>>
>
> hg diff path/to/file.c
>
> does not show the mode, but
>
> hg diff
>
> or
>
> hg diff path/
>
> does show mode changes.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120106/01d34b9f/attachment.html>


More information about the petsc-dev mailing list