git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 5/7] remote-bzr: add simple tests

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 28, 2012, 17:36 UTC
Message-ID
<7vy5hlvddb.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1352643598-8500-6-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 30 quoted lines
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  contrib/remote-helpers/test-bzr.sh | 111 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 111 insertions(+)
>  create mode 100755 contrib/remote-helpers/test-bzr.sh
>
> diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh
> new file mode 100755
> index 0000000..8594ffc
> --- /dev/null
> +++ b/contrib/remote-helpers/test-bzr.sh
> @@ -0,0 +1,111 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2012 Felipe Contreras
> +#
> +
> +test_description='Test remote-bzr'
> +
> +. ./test-lib.sh
> +
> +if ! test_have_prereq PYTHON; then
> +	skip_all='skipping remote-bzr tests; python not available'
> +	test_done
> +fi
> +
> +if ! "$PYTHON_PATH" -c 'import bzrlib'; then
> +	skip_all='skipping remote-bzr tests; bzr not available'
> +	test_done
> +fi
Show 8 quoted lines
> +cmd=<<EOF
> +import bzrlib
> +bzrlib.initialize()
> +import bzrlib.plugin
> +bzrlib.plugin.load_plugins()
> +import bzrlib.plugins.fastimport
> +EOF
> +if ! "$PYTHON_PATH" -c "$cmd"; then

I cannot see how this could have ever worked. It could be that you wrote it for zsh and tested only with the version of zsh you have; zsh I have here does not grok it (and of course dash and bash won't).

In any case, I do not think this is a POSIX shell. Just replace "=<<EOF" and "EOF" with single quote and everybody's shell should be able to read it.

Show 11 quoted lines
> +	echo "consider setting BZR_PLUGIN_PATH=$HOME/.bazaar/plugins" 1>&2
> +	skip_all='skipping remote-bzr tests; bzr-fastimport not available'
> +	test_done
> +fi
> +
> +check () {
> +	(cd $1 &&
> +	git log --format='%s' -1 &&
> +	git symbolic-ref HEAD) > actual &&
> +	(echo $2 &&
> +	echo "refs/heads/$3") > expected &&
Style: s/> expected/>expected/;
I won't repeat this but there are many others in this file.
Thanks.
Previous: Felipe ContrerasNext: Felipe Contreras
Message 12 of 26 in “New remote-bzr remote helper”
  1. 0/7 New remote-bzr remote helperFelipe Contreras, Nov 11, 2012
  2. 1/7 Add new remote-bzr transport helperFelipe Contreras, Nov 11, 2012
  3. 2/7 remote-bzr: add support for pushingFelipe Contreras, Nov 11, 2012
  4. 3/7 remote-bzr: add support for remote repositoriesFelipe Contreras, Nov 11, 2012
  5. 4/7 remote-bzr: update working treeFelipe Contreras, Nov 11, 2012
  6. Junio C HamanoNov 28, 2012
  7. Felipe ContrerasDec 13, 2012
  8. Junio C HamanoDec 13, 2012
  9. Junio C HamanoDec 13, 2012
  10. Felipe ContrerasDec 14, 2012
  11. 5/7 remote-bzr: add simple testsFelipe Contreras, Nov 11, 2012
  12. Junio C HamanoNov 28, 2012
  13. 6/7 remote-bzr: add support for fecthing special modesFelipe Contreras, Nov 11, 2012
  14. 7/7 remote-bzr: add support to push special modesFelipe Contreras, Nov 11, 2012
  15. Felipe ContrerasNov 24, 2012
  16. Junio C HamanoNov 26, 2012
  17. Felipe ContrerasNov 26, 2012
  18. Junio C HamanoNov 27, 2012
  19. Felipe ContrerasNov 28, 2012
  20. Junio C HamanoNov 28, 2012
  21. Felipe ContrerasNov 28, 2012
  22. Junio C HamanoNov 28, 2012
  23. Felipe ContrerasNov 28, 2012
  24. Junio C HamanoNov 28, 2012
  25. Felipe ContrerasNov 28, 2012
  26. Felipe ContrerasNov 28, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.