Christian Couder [off-list ref] writes:
All the python scripts except contrib/svn-fe/svnrdump_sim.py
start with "#!/usr/bin/env python".
This patch fix contrib/svn-fe/svnrdump_sim.py to do the same.
I suspect you need a bit more than that.
$ make git-p4
$ diff -u git-p4.py git-p4
shows you how we tell the scripts how to find their interpreters
(that way, there is no need to rely on the existence of
/usr/bin/env).
quoted hunk
Signed-off-by: Christian Couder <redacted>
---
contrib/svn-fe/svnrdump_sim.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/svn-fe/svnrdump_sim.py b/contrib/svn-fe/svnrdump_sim.py
index 1cfac4a..d219180 100755
--- a/contrib/svn-fe/svnrdump_sim.py
+++ b/contrib/svn-fe/svnrdump_sim.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
"""
Simulates svnrdump by replaying an existing dump from a file, taking care
of the specified revision range.
On Wed, Nov 28, 2012 at 8:36 AM, Junio C Hamano [off-list ref] wrote:
Christian Couder [off-list ref] writes:
quoted
All the python scripts except contrib/svn-fe/svnrdump_sim.py
start with "#!/usr/bin/env python".
This patch fix contrib/svn-fe/svnrdump_sim.py to do the same.
I suspect you need a bit more than that.
$ make git-p4
$ diff -u git-p4.py git-p4
shows you how we tell the scripts how to find their interpreters
(that way, there is no need to rely on the existence of
/usr/bin/env).
That works if somebody managed to export PYTHON_PATH, which very very
often is not the case for me.
./git-p4
zsh: ./git-p4: bad interpreter: /usr/bin/python: no such file or directory
In this case git-p4.py is correct, and git-p4 is not.
Either way, this is for contrib, and we don't have a standard
procedure for python scripts there. /usr/bin/env is better than
nothing, and in the vast majority of cases, more than enough.
Cheers.
--
Felipe Contreras
On Wed, Nov 28, 2012 at 9:03 AM, Felipe Contreras
[off-list ref] wrote:
On Wed, Nov 28, 2012 at 8:36 AM, Junio C Hamano [off-list ref] wrote:
quoted
Christian Couder [off-list ref] writes:
quoted
All the python scripts except contrib/svn-fe/svnrdump_sim.py
start with "#!/usr/bin/env python".
This patch fix contrib/svn-fe/svnrdump_sim.py to do the same.
I suspect you need a bit more than that.
$ make git-p4
$ diff -u git-p4.py git-p4
shows you how we tell the scripts how to find their interpreters
(that way, there is no need to rely on the existence of
/usr/bin/env).
That works if somebody managed to export PYTHON_PATH, which very very
often is not the case for me.
Yeah, and even if PYTHON_PATH is used, in t9020-remote-svn.sh,
svnrdump.py is used as is.
So if your python is not /usr/bin/python, you cannot just add
something to $PATH to pass the test.
Best regards,
Christian.