Identified by testing on IRIX 6.5, Solaris 5.7, and 5.10
Brandon Casey (5):
t/t5800: skip if python version is older than 2.5
git-request-pull.sh: remove -e switch to shell interpreter which
breaks ksh
t/t5150: remove space from sed script
t/t7006: ignore return status of shell's unset builtin
t/aggregate-results: accomodate systems with small max argument list
length
git-request-pull.sh | 2 +-
t/Makefile | 4 +++-
t/aggregate-results.sh | 2 +-
t/t5150-request-pull.sh | 4 ++--
t/t5800-remote-helpers.sh | 4 ++--
t/t7006-pager.sh | 10 +++++-----
t/test-lib.sh | 9 +++++++++
7 files changed, 23 insertions(+), 12 deletions(-)
From: Brandon Casey <redacted>
The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a
variable name which was not previously set. Since the unset is not likely
to fail, ignore it's return status.
Signed-off-by: Brandon Casey <redacted>
---
t/t7006-pager.sh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
@@ -159,7 +159,7 @@ test_expect_success 'color when writing to a file intended for a pager' '' test_expect_success'determine default pager''-unsetPAGERGIT_PAGER&&+unsetPAGERGIT_PAGERtest_might_failgitconfig--unsetcore.pager||cleanup_fail&&
@@ -173,7 +173,7 @@ thenfi test_expect_successSIMPLEPAGER'default pager is used by default''-unsetPAGERGIT_PAGER&&+unsetPAGERGIT_PAGERtest_might_failgitconfig--unsetcore.pager&&rm-fdefault_pager_used||cleanup_fail&&
@@ -192,7 +192,7 @@ test_expect_success SIMPLEPAGER 'default pager is used by default' '' test_expect_successTTY'PAGER overrides default pager''-unsetGIT_PAGER&&+unsetGIT_PAGERtest_might_failgitconfig--unsetcore.pager&&rm-fPAGER_used||cleanup_fail&&
From: Brandon Casey <redacted>
Solaris's xpg4/sed and IRIX's sed fail to parse these negated matching
expressions when the '!' is separated from the command that follows.
Signed-off-by: Brandon Casey <redacted>
---
t/t5150-request-pull.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
From: Brandon Casey <redacted>
The -e option causes the shell to exit immediately when a command exits
with a non-zero exit status. This does not seem to cause a problem for
Bash, but it does cause a problem for the Korn shell, like Solaris's
xpg4/sh, whose unset utility returns non-zero if it is passed a variable
name which was not previously set. When using xpg4/sh, git-request-pull
exits while sourcing git-sh-setup since git-sh-setup tries to unset the
CDPATH environment variable.
When git-request-pull was originally written, it did not do any error
checking and it used this shell feature to exit when an error occurred.
This script now performs proper error checking and provides useful error
messages, so this -e option appears to be merely a historical artifact and
can be removed.
Kudos to Jonathan Nieder for introducing t5150 which exercises the
request-pull code path.
Signed-off-by: Brandon Casey <redacted>
---
git-request-pull.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
@@ -1,4 +1,4 @@-#!/bin/sh -e+#!/bin/sh# Copyright 2005, Ryan Anderson <ryan@michonline.com>## This file is licensed under the GPL v2, or a later version
From: Brandon Casey <redacted>
This test script depends on the git-remote-testgit python script. This
python script makes use of the hashlib module which was released in python
version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to
test-lib.sh and check for it in t5800.
Signed-off-by: Brandon Casey <redacted>
---
t/t5800-remote-helpers.sh | 4 ++--
t/test-lib.sh | 9 +++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
From: Brandon Casey <redacted>
IRIX 6.5 has a default maximum argument list length of 20480. The file
glob that is passed to aggregate-results currently exceeds this length, and
so the script cannot run successfully. Work around this issue by passing
the file names in via the standard input rather than the argument list.
Signed-off-by: Brandon Casey <redacted>
---
t/Makefile | 4 +++-
t/aggregate-results.sh | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
@@ -35,7 +35,9 @@ aggregate-results-and-cleanup: $(T)$(MAKE)cleanaggregate-results:-'$(SHELL_PATH_SQ)'./aggregate-results.shtest-results/t*-*+forfintest-results/t*-*;do\+echo"$$f";\+done|'$(SHELL_PATH_SQ)'./aggregate-results.sh# we can test NO_OPTIMIZE_COMMITS independently of LC_ALLfull-svn-test:
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:48:53
Brandon Casey wrote:
Solaris's xpg4/sed and IRIX's sed fail to parse these negated matching
expressions when the '!' is separated from the command that follows.
Signed-off-by: Brandon Casey <redacted>
Good catch, thanks.
Acked-by: Jonathan Nieder <redacted>
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:48:53
Brandon Casey wrote:
When git-request-pull was originally written, it did not do any error
checking and it used this shell feature to exit when an error occurred.
This script now performs proper error checking and provides useful error
messages, so this -e option appears to be merely a historical artifact and
can be removed.
Also, the MinGW port ignores -e on a #! line, so we should not rely on it.
To maintain the old behavior, I think we would need something like
this:
-- 8< --
Subject: request-pull: more explicit error handling
git request-pull includes -e on its #! line to catch miscellaneous
errors, but most of the body of the script explicitly handles
errors. Finish the job so we can remove the -e.
Suggested-by: Brandon Casey <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
@@ -70,10 +70,10 @@ git show -s --format='The following changes since commit %H:%s(%ci)-areavailableinthegitrepositoryat:'$baserev-echo" $url$branch"-echo+areavailableinthegitrepositoryat:'$baserev&&+echo" $url$branch"&&+echo&&-gitshortlog^$baserev$headrev-gitdiff-M--stat--summary$patch$merge_base..$headrev+gitshortlog^$baserev$headrev&&+gitdiff-M--stat--summary$patch$merge_base..$headrev||exitexit$status
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:48:53
Brandon Casey wrote:
The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a
variable name which was not previously set.
This is historical ksh behavior (only changed in 2009-01-14) even if
it violates SUSv2. It probably comes up on a lot of platforms.
Thanks.
Acked-by: Jonathan Nieder <redacted>
Heya,
On Wed, Jun 2, 2010 at 02:13, Brandon Casey [off-list ref] wrote:
This test script depends on the git-remote-testgit python script. This
python script makes use of the hashlib module which was released in python
version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to
test-lib.sh and check for it in t5800.
Perhaps instead we can change git-remote-testgit to do:
"try:
import hashlib
except ImportError:
import ?? as hashlib
"
Otoh, python 2.5 has been out for a while (and is in fact only
downloadable as a source-only release these days). To be exact, it was
released on September 19, 2006.
--
Cheers,
Sverre Rabbelier
On Wed, Jun 2, 2010 at 06:21, Sverre Rabbelier [off-list ref] wrote:
Otoh, python 2.5 has been out for a while (and is in fact only
downloadable as a source-only release these days). To be exact, it was
released on September 19, 2006.
As a trivia: most of our Perl code is still 5.6 compatible. That'd be
like supporting Python 1.6 (or actually, 1.5.2, 1.6 came out half a
year after Perl 5.6).
Anyway, dying in the program as you suggest seems like a better idea.
When git-request-pull was originally written, it did not do any error
checking and it used this shell feature to exit when an error occurred.
This script now performs proper error checking and provides useful error
messages, so this -e option appears to be merely a historical artifact and
can be removed.
Also, the MinGW port ignores -e on a #! line, so we should not rely on it.
Heya,
On Wed, Jun 2, 2010 at 02:13, Brandon Casey [off-list ref] wrote:
quoted
This test script depends on the git-remote-testgit python script. This
python script makes use of the hashlib module which was released in python
version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to
test-lib.sh and check for it in t5800.
Perhaps instead we can change git-remote-testgit to do:
"try:
import hashlib
except ImportError:
import ?? as hashlib
"
I can only guess at what that does. :)
Otoh, python 2.5 has been out for a while (and is in fact only
downloadable as a source-only release these days). To be exact, it was
released on September 19, 2006.
That's only long in python years. :)
RedHat's latest operating system still has version 2.4.3.
-brandon
Heya,
On Wed, Jun 2, 2010 at 02:13, Brandon Casey [off-list ref] wrote:
quoted
This test script depends on the git-remote-testgit python script. This
python script makes use of the hashlib module which was released in python
version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to
test-lib.sh and check for it in t5800.
Perhaps instead we can change git-remote-testgit to do:
"try:
import hashlib
except ImportError:
import ?? as hashlib
"
I can only guess at what that does. :)
Correction, I have no idea what that does.
Here's the patch:
From: Brandon Casey <redacted>
The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a
variable name which was not previously set. Since the unset is not likely
to fail, ignore its return status, but add a semicolon as a clue that the
'&&' was deliberately left off.
Signed-off-by: Brandon Casey <redacted>
---
t/t7006-pager.sh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
@@ -159,7 +159,7 @@ test_expect_success 'color when writing to a file intended for a pager' '' test_expect_success'determine default pager''-unsetPAGERGIT_PAGER&&+unsetPAGERGIT_PAGER;test_might_failgitconfig--unsetcore.pager||cleanup_fail&&
@@ -173,7 +173,7 @@ thenfi test_expect_successSIMPLEPAGER'default pager is used by default''-unsetPAGERGIT_PAGER&&+unsetPAGERGIT_PAGER;test_might_failgitconfig--unsetcore.pager&&rm-fdefault_pager_used||cleanup_fail&&
@@ -192,7 +192,7 @@ test_expect_success SIMPLEPAGER 'default pager is used by default' '' test_expect_successTTY'PAGER overrides default pager''-unsetGIT_PAGER&&+unsetGIT_PAGER;test_might_failgitconfig--unsetcore.pager&&rm-fPAGER_used||cleanup_fail&&
Heya,
On Wed, Jun 2, 2010 at 17:15, Brandon Casey
[off-list ref] wrote:
Here's the patch:
That was not meant as a concrete suggestion :P. I meant that I did not
know what package is available in 2.4.x, so substitute it on the ??'s
:P. The ? does not mean anything.
--
Cheers,
Sverre Rabbelier
Heya,
On Wed, Jun 2, 2010 at 17:15, Brandon Casey
[off-list ref] wrote:
quoted
Here's the patch:
That was not meant as a concrete suggestion :P. I meant that I did not
know what package is available in 2.4.x, so substitute it on the ??'s
:P. The ? does not mean anything.
Ha! That shows you how much python I know!
Hand, meet forehead.
-b
Heya,
On Wed, Jun 2, 2010 at 02:13, Brandon Casey [off-list ref] wrote:
quoted
This test script depends on the git-remote-testgit python script. This
python script makes use of the hashlib module which was released in python
version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to
test-lib.sh and check for it in t5800.
Perhaps instead we can change git-remote-testgit to do:
"try:
import hashlib
except ImportError:
import ?? as hashlib
"
Here's a work-around for the test suite until we figure out
what ?? should be.
[PATCH 1/2] Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS
[PATCH 2/2] t/t5800: skip if python version is older than 2.5
From: Brandon Casey <redacted>
This allows the correct python to be used by the test suite.
Signed-off-by: Brandon Casey <redacted>
---
Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
From: Brandon Casey <redacted>
This test script depends on the git-remote-testgit python script. The
git-remote-testgit script makes use of the hashlib module which was
released in python version 2.5. So, check the python version and skip this
test if it's too old.
Signed-off-by: Brandon Casey <redacted>
---
By the way, I don't have python 2.5 or newer to test this. :p
-brandon
t/t5800-remote-helpers.sh | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
From: Junio C Hamano <hidden> Date: 2016-06-15 22:48:54
Brandon Casey [off-list ref] writes:
On 06/01/2010 11:30 PM, Jonathan Nieder wrote:
quoted
Brandon Casey wrote:
...
To maintain the old behavior, I think we would need something like
this:
-- 8< --
Subject: request-pull: more explicit error handling
I just checkout out this revision, there is no PYTHON_PATH variable. So:
sverre@laptop-sverre:~/code/git/t$ make t5800-remote-helpers.sh
*** t5800-remote-helpers.sh ***
t5800-remote-helpers.sh: line 10: : command not found
* skipping git remote-testgit tests: requires Python 2.5 or newer
* passed all 0 test(s)
I'm not sure what is wrong here, but somehow the PYTHON_PATH variable
is not propagated to the script?
--
Cheers,
Sverre Rabbelier
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:49:20
Sverre Rabbelier wrote:
sverre@laptop-sverre:~/code/git/t$ make t5800-remote-helpers.sh
*** t5800-remote-helpers.sh ***
t5800-remote-helpers.sh: line 10: : command not found
* skipping git remote-testgit tests: requires Python 2.5 or newer
* passed all 0 test(s)
I'm not sure what is wrong here, but somehow the PYTHON_PATH variable
is not propagated to the script?
On Tue, Aug 17, 2010 at 7:10 PM, Sverre Rabbelier [off-list ref] wrote:
Heya,
On Tue, Aug 17, 2010 at 18:37, Jonathan Nieder [off-list ref] wrote:
quoted
I see. Maybe this is fixed by v1.7.2-rc0~33^2~1 (Makefile: add
PYTHON_PATH to GIT-BUILD-OPTIONS, 2010-06-09) from later in the
same series.
Well not actually the same series. If I recall correctly, the
original version of
this 'skip if python vers...' patch was replaced by a resend of two patches and
one of them did the' propagate PYTHON_PATH to GIT-BUILD-OPTIONS' thing.
I think Junio ended up fixing up the original patch by hand, and the PYTHON_PATH
bit got dropped.
Later on I resent it.
Ah, correct. So that should have gone before this one. It works if I
check out and build that one. Thanks.
Also, note that the test should complete successfully if run via 'make
test' since
PYTHON_PATH is exported in the Makefile. That's why I didn't notice the
flaw at first.
-Brandon