Re: [PATCH v2 2/3] remote-helpers: move out of contrib
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 21, 2014, 21:24 UTC
- Message-ID
- <53558c7fbd4d4_604be1f30c30@nysa.notmuch>
- In-Reply-To
- <xmqqppka8jiw.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
Show 25 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes: > > > contrib/remote-helpers/test-bzr.sh | 2 +- > > contrib/remote-helpers/test-hg-bidi.sh | 2 +- > > contrib/remote-helpers/test-hg-hg-git.sh | 4 ++-- > > contrib/remote-helpers/test-hg.sh | 2 +- > > contrib/remote-helpers/git-remote-bzr => git-remote-bzr.py | 0 > > contrib/remote-helpers/git-remote-hg => git-remote-hg.py | 0 > > 8 files changed, 9 insertions(+), 5 deletions(-) > > rename contrib/remote-helpers/git-remote-bzr => git-remote-bzr.py (100%) > > rename contrib/remote-helpers/git-remote-hg => git-remote-hg.py (100%) > > ... > > diff --git a/contrib/remote-helpers/test-hg-bidi.sh b/contrib/remote-helpers/test-hg-bidi.sh > > index 2b5aa9d..d44ec92 100755 > > --- a/contrib/remote-helpers/test-hg-bidi.sh > > +++ b/contrib/remote-helpers/test-hg-bidi.sh > > @@ -17,7 +17,7 @@ then > > test_done > > fi > > > > -if ! python -c 'import mercurial' > /dev/null 2>&1 > > +if ! "$PYTHON_PATH" -c 'import mercurial' > /dev/null 2>&1 > > Does this change relate to the moving of main scripts, and if so > how?
Yes.
Before the scripts were not generated, the shebang was '/usr/bin/env python', that means if the user doesn't have 'python' but 'python2' git-remote-hg would fail, even if the user did PYTHON_PATH=python2, therefore the test scripts should fail too, and that's the reason 'python' is used in the test scripts.
Now that the scripts are generated the build system would replace the shebang, and PYTHON_PATH will be used correctly, and we should use that in the tests.
I actually implemented this script generation inside contrib/remote-helpers, indepedently of the move, but you didn't apply those patches.
-- Felipe Contreras