public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt•net>
To: Kazutoshi Satoda <k_satoda@f2•dion.ne.jp>,
	Junio C Hamano <gitster@pobox•com>
Cc: git@vger•kernel.org, alex.crezoff@gmail•com
Subject: Re: [PULL] svn pathnameencoding for git svn dcommit
Date: Tue, 16 Feb 2016 06:33:57 +0000	[thread overview]
Message-ID: <20160216063357.GA17455@dcvr.yhbt.net> (raw)
In-Reply-To: <56C297A9.2080705@f2.dion.ne.jp>

Junio, sorry about basing on next, I somehow
thought I was going to need to depend on something there.
Updated pull below if Kazutoshi can run the test effectively.

Kazutoshi Satoda <k_satoda@f2•dion.ne.jp> wrote:
> Thank you for the tests. But, on my environment, both of them failed
> unexpectedly. (Windows 7 SP1, x86_64 Cygwin, LANG=ja_JP.UTF-8)
> 
> For now, I don't have enough time to investigate this further. Let me
> just share the result.

<snip>

> > Untracked files:
> >         svnrepo/
> >         "\357\202\201\357\202\202"
> >         "\357\202\201\357\202\207"
> >

<snip>

> I can't see how "\357\202\201\357\202\202" came as output in the test.

I wonder if it's a shell or printf portability problem.  I've
repushed the branch against master and implemented the weird
character use inside Perl scripts.

Can you give it a try?

The following changes since commit 494398473714dcbedb38b1ac79b531c7384b3bc4:

  Sixth batch for the 2.8 cycle (2016-02-10 14:24:14 -0800)

are available in the git repository at:

  git://bogomips.org/git-svn.git ks/svn-pathnameencoding

for you to fetch changes up to 7d7ea44ea5a1a38ee36402e6709e64c05650ba46:

  git-svn: apply "svn.pathnameencoding" before URL encoding (2016-02-16 06:25:01 +0000)

----------------------------------------------------------------
Kazutoshi Satoda (2):
      git-svn: enable "svn.pathnameencoding" on dcommit
      git-svn: apply "svn.pathnameencoding" before URL encoding

 perl/Git/SVN/Editor.pm                   |  4 +++-
 t/t9115-git-svn-dcommit-funky-renames.sh | 16 ++++++++++++++--
 t/t9115/inf.perl                         | 12 ++++++++++++
 t/t9115/neq.perl                         |  5 +++++
 4 files changed, 34 insertions(+), 3 deletions(-)
 create mode 100644 t/t9115/inf.perl
 create mode 100644 t/t9115/neq.perl

 t/t9115-git-svn-dcommit-funky-renames.sh | 16 +++-------------
 t/t9115/inf.perl                         | 12 ++++++++++++
 t/t9115/neq.perl                         |  5 +++++
 3 files changed, 20 insertions(+), 13 deletions(-)

Interdiff of test changes:

diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh
index 9828f05..94698fe 100755
--- a/t/t9115-git-svn-dcommit-funky-renames.sh
+++ b/t/t9115-git-svn-dcommit-funky-renames.sh
@@ -84,25 +84,15 @@ test_expect_success 'git svn rebase works inside a fresh-cloned repository' '
 		test -e test-rebase
 	)'
 
-test_expect_success 'svn.pathnameencoding=cp932 new file on dcommit' '
-	neq=$(printf "\201\202") &&
+test_expect_success PERL 'svn.pathnameencoding=cp932 new file on dcommit' '
 	git config svn.pathnameencoding cp932 &&
-	echo neq >"$neq" &&
-	git add "$neq" &&
+	"$PERL_PATH" -w "$TEST_DIRECTORY"/t9115/neq.perl &&
 	git commit -m "neq" &&
 	git svn dcommit
 '
 
 test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '
-	inf=$(printf "\201\207") &&
-	git config svn.pathnameencoding cp932 &&
-	echo inf >"$inf" &&
-	git add "$inf" &&
-	git commit -m "inf" &&
-	git svn dcommit &&
-	git mv "$inf" inf &&
-	git commit -m "inf rename" &&
-	git svn dcommit
+	"$PERL_PATH" -w "$TEST_DIRECTORY"/t9115/inf.perl
 '
 
 stop_httpd
diff --git a/t/t9115/inf.perl b/t/t9115/inf.perl
new file mode 100644
index 0000000..0adcfc7
--- /dev/null
+++ b/t/t9115/inf.perl
@@ -0,0 +1,12 @@
+use strict;
+my $path = "\201\207";
+open my $fh, '>', $path or die $!;
+close $fh or die $!;
+sub run { system(@_) == 0 or die join(' ', @_) . ": $?" }
+run(qw(git config svn.pathnameencoding cp932));
+run(qw(git add), $path);
+run(qw(git commit -m inf));
+run(qw(git svn dcommit));
+run(qw(git mv), $path, 'inf');
+run(qw(git commit -m inf-rename));
+run(qw(git svn dcommit));
diff --git a/t/t9115/neq.perl b/t/t9115/neq.perl
new file mode 100644
index 0000000..91b1061
--- /dev/null
+++ b/t/t9115/neq.perl
@@ -0,0 +1,5 @@
+use strict;
+my $path = "\201\202";
+open my $fh, '>', $path or die $!;
+close $fh or die $!;
+exec(qw(git add), $path);

  reply	other threads:[~2016-02-16  6:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 15:19 [PATCH 0/2] enable "svn.pathnameencoding" on dcommit Kazutoshi Satoda
2016-02-08 15:20 ` [PATCH 1/2] git-svn: " Kazutoshi Satoda
2016-02-15  0:30   ` Eric Wong
2016-02-08 15:21 ` [PATCH 2/2] git-svn: apply "svn.pathnameencoding" before URL encoding Kazutoshi Satoda
2016-02-15  0:33   ` Eric Wong
2016-02-08 22:58 ` [PATCH 0/2] enable "svn.pathnameencoding" on dcommit Eric Wong
2016-02-15  0:52   ` [PULL] svn pathnameencoding for git svn dcommit Eric Wong
2016-02-15 21:32     ` Junio C Hamano
2016-02-16  3:29     ` Kazutoshi Satoda
2016-02-16  6:33       ` Eric Wong [this message]
2016-02-16 16:19         ` Kazutoshi Satoda
2016-02-20 23:37           ` Eric Wong
2016-02-21 13:12             ` Kazutoshi Satoda
2016-02-27 18:28   ` [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS tboegi
2016-02-28  4:59     ` Eric Wong
2016-02-28 17:52       ` Torsten Bögershausen
2016-03-15  1:59         ` Eric Wong
2016-03-15  5:23           ` Torsten Bögershausen
2016-03-15  7:09             ` Eric Wong
2016-03-16 17:37               ` Kazutoshi Satoda
2016-03-17  5:16                 ` Torsten Bögershausen
2016-03-17  5:35                   ` Torsten Bögershausen
2016-03-18  2:15                     ` Kazutoshi Satoda
2016-03-19  6:59                       ` Torsten Bögershausen
2016-03-18  2:14                   ` Kazutoshi Satoda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160216063357.GA17455@dcvr.yhbt.net \
    --to=normalperson@yhbt$(echo .)net \
    --cc=alex.crezoff@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=k_satoda@f2$(echo .)dion.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox