[PATCH] generaldelta: fix test

Wojciech Lopata lopek at fb.com
Tue Oct 1 04:25:33 UTC 2013


> Bwuh. So why wasn't this failing? Or why isn't it failing (i.e., having changed
> output) now?

Because $regsize == $gdsize at the end of execution, which is fine (that means that manifest in a repo that uses generaldelta has the same size as if it didn't use GD) . If $regsize was bigger than $gdsize it would also be fine, but test would fail.

> -----Original Message-----
> From: Kevin Bullock [mailto:kbullock+mercurial at ringworld.org]
> Sent: Monday, September 30, 2013 8:33 PM
> To: Wojciech Lopata
> Cc: mercurial-devel at selenic.com
> Subject: Re: [PATCH] generaldelta: fix test
> 
> On 30 Sep 2013, at 8:45 PM, Wojciech Lopata wrote:
> 
> > # HG changeset patch
> > # User Wojciech Lopata <lopek at fb.com>
> > # Date 1380590862 25200
> > #      Mon Sep 30 18:27:42 2013 -0700
> > # Node ID f59a98c5a16d2bf7aa2ca73178ae7b70902347b9
> > # Parent  c80feeb715d1ebe9232c00881d43c1bbb594b3fa
> > generaldelta: fix test
> >
> > diff --git a/tests/test-generaldelta.t b/tests/test-generaldelta.t
> > --- a/tests/test-generaldelta.t
> > +++ b/tests/test-generaldelta.t
> > @@ -18,6 +18,6 @@
> >   $ cd ..
> >   $ regsize=`du -s -b repo/.hg/store/00manifest.i | cut -f 1`
> >   $ gdsize=`du -s -b gdrepo/.hg/store/00manifest.i | cut -f 1`
> > -  $ if [ $regsize -gt $gdsize ]; then
> > +  $ if [ $regsize -lt $gdsize ]; then
> >>  echo 'generaldelta increased size of a revlog!'
> >> fi
> 
> Bwuh. So why wasn't this failing? Or why isn't it failing (i.e., having changed
> output) now?
> 
> pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
> Kevin R. Bullock



More information about the Mercurial-devel mailing list