[PATCH 3 of 5] largefiles: use smaller files in test script

Carter, Eli Eli.Carter at tektronix.com
Mon Oct 24 10:13:25 CDT 2011


Greg,

I disagree with these changes.  We need to test that the memory warning message is not displayed in the first case.  Your change of filesize eliminates that check.

Also, this changes the intent of the "Commit another file that should get automatically added as a largefile" test.  The point of that test was to test that a file is automatically added as a largefile _without_ any options on the commandline for largefiles.  That does mean a 10MB file is required to test that.

Eli

> -----Original Message-----
> From: mercurial-devel-bounces at selenic.com [mailto:mercurial-devel-
> bounces at selenic.com] On Behalf Of Greg Ward
> Sent: Thursday, October 20, 2011 9:25 PM
> To: mercurial-devel at selenic.com
> Subject: [PATCH 3 of 5] largefiles: use smaller files in test script
> 
> # HG changeset patch
> # User Greg Ward <greg at gerg.ca>
> # Date 1319163864 14400
> # Branch stable
> # Node ID 70cc4a2b4f72b14905977b65e239b5ee12efa861
> # Parent  2342ce10ae6ce8dc66c9f43aa10cba75c74c700a
> largefiles: use smaller files in test script
> 
> diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
> --- a/tests/test-largefiles.t
> +++ b/tests/test-largefiles.t
> @@ -193,7 +193,7 @@
>  Config settings (pattern **.dat, minsize 2 MB) are respected.
> 
>    $ echo testdata > test.dat
> -  $ dd bs=3145728 count=1 if=/dev/zero of=reallylarge > /dev/null 2>
> /dev/null
> +  $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2>
> + /dev/null
>    $ hg add
>    adding reallylarge as a largefile
>    adding test.dat as a largefile
> @@ -677,16 +677,14 @@
>  "lfconvert" works
>    $ hg init bigfile-repo
>    $ cd bigfile-repo
> -  $ dd if=/dev/zero bs=1k count=23k > a-large-file 2> /dev/null
> +  $ dd if=/dev/zero bs=1k count=256 > a-large-file 2> /dev/null
>    $ hg addremove
>    adding a-large-file
> -  a-large-file: up to 72 MB of RAM may be required to manage this file
> -  (use 'hg revert a-large-file' to cancel the pending addition)
> -  $ hg commit -m "Commit file without making it be a largefile"
> +  $ hg commit -m "add a-large-file (as a normal file)"
>    $ find .hg/largefiles
>    .hg/largefiles
>    $ cd ..
> -  $ hg lfconvert --size 10 bigfile-repo largefiles-repo
> +  $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
>    initializing destination largefiles-repo
> 
>  "lfconvert" adds 'largefiles' to .hg/requires.
> @@ -704,13 +702,13 @@
>    getting changed largefiles
>    1 largefiles updated, 0 removed
>    $ cat .hglf/a-large-file
> -  8b0629c630f530cde051aeb42ce561756738fbe7
> -  $ dd if=/dev/zero bs=1k count=11k > another-large-file 2> /dev/null
> -  $ hg add another-large-file
> -  $ hg commit -m "Commit another file that should get automatically added
> as a largefile"
> +  2e000fa7e85759c7f4c254d4d9c33ef481e459a7
> +  $ dd if=/dev/zero bs=1k count=1k > another-large-file 2> /dev/null  $
> + hg add --lfsize=1 another-large-file  $ hg commit -m "add
> + another-large-file (should be a largefile)"
>    $ cat .hglf/a-large-file .hglf/another-large-file
> -  8b0629c630f530cde051aeb42ce561756738fbe7
> -  187a0f76e02aac9c24f71c820be1f34ef1c76e76
> +  2e000fa7e85759c7f4c254d4d9c33ef481e459a7
> +  3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
>    $ cd ..
>    $ rm -rf bigfile-repo largefiles-repo
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel




More information about the Mercurial-devel mailing list