[PATCH 2 of 3 STABLE] tests: use -f when clearing largefile usercache

Mads Kiilerich mads at kiilerich.com
Tue Oct 23 12:11:49 CDT 2012


Matt Harbison wrote, On 10/23/2012 06:04 AM:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1350962187 14400
> # Branch stable
> # Node ID a233e59d55e75f810488a0c94ff2e1e17696ba23
> # Parent  6269e84db360cec75cb70982079f84fba4e9bf21
> tests: use -f when clearing largefile usercache
>
> A subsequent test will cause an rm without -f to report an error, so all uses
> were converted to avoid future issues like this.

Which subsequent test will cause which error?

Is it just because one of the rm's will become redundant because you add 
another rm?

I think it is slightly better that we know that the rm's are there for a 
purpose and actually do remove something. If one of them no longer is 
needed then remove it ... or add a -f and a comment there.

/Mads

>
> diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
> --- a/tests/test-largefiles.t
> +++ b/tests/test-largefiles.t
> @@ -700,7 +700,7 @@
>   
>   Test cloning with --all-largefiles flag
>   
> -  $ rm "${USERCACHE}"/*
> +  $ rm -f "${USERCACHE}"/*
>     $ hg clone --all-largefiles a a-backup
>     updating to branch default
>     5 files updated, 0 files merged, 0 files removed, 0 files unresolved
> @@ -708,7 +708,7 @@



More information about the Mercurial-devel mailing list