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

Greg Ward greg-hg at gerg.ca
Mon Nov 2 08:24:21 CST 2009


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!

Greg


More information about the Mercurial-devel mailing list