summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-01-18 06:11:44 (GMT)
committerEric Wong <normalperson@yhbt.net>2009-01-18 23:38:28 (GMT)
commit1ef626b4b6c70fc13062faafdccb2f0da7578a29 (patch)
tree9d0b02e66fed8905d96ef136a6c50e4ea60bb465 /t
parente82f0d73f02e89a95d9477911774d314f70f1063 (diff)
downloadgit-1ef626b4b6c70fc13062faafdccb2f0da7578a29.zip
git-1ef626b4b6c70fc13062faafdccb2f0da7578a29.tar.gz
git-1ef626b4b6c70fc13062faafdccb2f0da7578a29.tar.bz2
git-svn: fix SVN 1.1.x compatibility
The get_log() function in the Perl SVN API introduced the limit parameter in 1.2.0. However, this got discarded in our SVN::Ra compatibility layer when used with SVN 1.1.x. We now emulate the limit functionality in older SVN versions by preventing the original callback from being called if the given limit has been reached. This emulation is less bandwidth efficient, but SVN 1.1.x is becoming rarer now. Additionally, the --limit parameter in svn(1) uses the aforementioned get_log() functionality change in SVN 1.2.x. t9129 no longer depends on --limit to work and instead uses Perl to parse out the commit message. Thanks to Tom G. Christensen for the bug report. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t9129-git-svn-i18n-commitencoding.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/t/t9129-git-svn-i18n-commitencoding.sh b/t/t9129-git-svn-i18n-commitencoding.sh
index 8a9dde4..9c7b1ad 100755
--- a/t/t9129-git-svn-i18n-commitencoding.sh
+++ b/t/t9129-git-svn-i18n-commitencoding.sh
@@ -15,8 +15,17 @@ compare_git_head_with () {
}
compare_svn_head_with () {
- LC_ALL=en_US.UTF-8 svn log --limit 1 `git svn info --url` | \
- sed -e 1,3d -e "/^-\{1,\}\$/d" >current &&
+ # extract just the log message and strip out committer info.
+ # don't use --limit here since svn 1.1.x doesn't have it,
+ LC_ALL=en_US.UTF-8 svn log `git svn info --url` | perl -w -e '
+ use bytes;
+ $/ = ("-"x72) . "\n";
+ my @x = <STDIN>;
+ @x = split(/\n/, $x[1]);
+ splice(@x, 0, 2);
+ $x[-1] = "";
+ print join("\n", @x);
+ ' > current &&
test_cmp current "$1"
}