[PATCH 1 of 3] transaction: always remove empty journal on abort

Martin Geisler mg at lazybytes.net
Mon Nov 2 08:37:35 CST 2009


Greg Ward <greg-hg at gerg.ca> writes:

> On Fri, Oct 30, 2009 at 11:42 AM, Sune Foldager <cryo at cyanite.org> wrote:
>> --- a/tests/test-journal-exists
>> +++ b/tests/test-journal-exists
>> @@ -3,6 +3,7 @@
> [...]
>> +echo % check that zero-size journals are correctly aborted
>> +hg bundle -qa repo.hg
>> +chmod -w foo/.hg/store/00changelog.i
>> +hg -R foo unbundle repo.hg 2>&1 | sed 's/\(abort: Permission denied\).*/\1/'
>> +if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
>
> I see that this has been accepted, so it's a little late for
> bikeshedding.  Still, may that I suggest that a clearer way to say
> "failure" would be, ummm, "failure".  E.g.
>
>   if test -f foo/.hg/store/journal; then echo 'FAIL: journal exists'; fi
>
> That's a very minor stylistic nit, so IMHO not worth sending another
> patch.  Just something to think about for next time!

The exact message is not so important in the test suite -- the test will
be flagged as failed if any message shows up at all.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.


More information about the Mercurial-devel mailing list