[PATCH 2 of 5] tests: add 'f' tool for cross platform file operations in the tests

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Jan 15 08:05:38 CST 2015


At Wed, 14 Jan 2015 23:05:54 -0500,
Matt Harbison wrote:
> 
> On Wed, 14 Jan 2015 18:24:37 -0500, Mads Kiilerich <mads at kiilerich.com>  
> wrote:
> 
> > # HG changeset patch
> > # User Mads Kiilerich <madski at unity3d.com>
> > # Date 1421194526 -3600
> > #      Wed Jan 14 01:15:26 2015 +0100
> > # Node ID 2c32e9ed5aa5ee5a1091695d28e745ff1c2d868f
> > # Parent  1b43d00b9a2551b3e70b09562e27c50c0cb6decd
> > tests: add 'f' tool for cross platform file operations in the tests
> 
> I'm getting this test failure on Fedora 16, even without the patch I  
> submitted for Windows fixes.  Any ideas?

At least for tests of Mercurial, "stat.st_size" of directories seems
not to show valuable information, because:

  - it means not "how many blocks are USED(NEEDED)", but "how many
    blocks are ALLOCATED"

  - total size (blocksize * # of allocated blocks) of directories
    depends on underlying filesystems and devices

IMHO, "f" command can ignore "-s/--size" for directories.


> --- /home/matt/hg/tests/test-tools.t
> +++ /home/matt/hg/tests/test-tools.t.err
> @@ -60,7 +60,7 @@
> 
>     $ ln -s yadda l
>     $ f . --recurse -MStmsB4
> -  .: directory with 4 files, size=120, mode=755
> +  .: directory with 4 files, size=4096, mode=755
>     ./bar: file, size=21, mode=755, md5=3b03, sha1=612c
>     ./baz: file, size=21, mode=755, md5=3b03, sha1=612c
>     ./foo: file, size=4, mode=644, md5=d3b0, sha1=f1d2
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp


More information about the Mercurial-devel mailing list