{"thread":{"id":"41372","subject":"[PATCH 1/2] git-svn: enable \"svn.pathnameencoding\" on dcommit","startedAt":"2016-02-08T15:19:06Z","lastAt":"2016-03-19T06:59:21Z","messageCount":25,"participants":["Kazutoshi Satoda","Eric Wong","Junio C Hamano","tboegi@web.de","Torsten Bögershausen"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"277739","messageId":"56B8B1EA.5020901@f2.dion.ne.jp","threadId":"41372","inReplyTo":null,"subject":"[PATCH 0/2] enable \"svn.pathnameencoding\" on dcommit","fromName":"Kazutoshi Satoda","fromEmail":"k_satoda@f2.dion.ne.jp","sentAt":"2016-02-08T15:19:06Z","receivedAt":"2016-02-08T15:19:06Z","isPatch":true,"sender":{"key":"k_satoda@f2.dion.ne.jp","avatar":"https://avatars.githubusercontent.com/u/1337204?v=4"},"body":"These are small fixes to problems I encountered using git-svn with\nsvn.pathnameencoding configuration (cp932 in my case). The problems\nhappen only when sending changes on non-ASCII paths.\n\nI'm sorry not coming with test scripts, but I couldn't figure out how to\nwrite tests to reproduce problems happen only with non-UTF-8 paths while\nthe tests seems to be run on UTF-8 locale.\n\nI just ran existing tests with these fixes and there was no breakage\n(with UTF-8 locale).\n\nI think sending these fixes as-is is better than not sending because of\nmy lack of ability to write such tests. I also expect that these fixes\ncan be applied as-is because there were some small fixes without tests\nin the history of file perl/Git/SVN/Editor.pm.\n\nThe first one is an updated fix of an very old but not applied patch.\nhttp://comments.gmane.org/gmane.comp.version-control.git/164166#o2\n\nThe second one can be seen as a separate fix, but it takes effect only\nafter the first one.\n\nKazutoshi SATODA (2):\n  git-svn: enable \"svn.pathnameencoding\" on dcommit\n  git-svn: apply \"svn.pathnameencoding\" before URL encoding\n\n perl/Git/SVN/Editor.pm | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\n-- \n2.7.0\n"},{"id":"277738","messageId":"56B8B23F.2020901@f2.dion.ne.jp","threadId":"41372","inReplyTo":"56B8B1EA.5020901@f2.dion.ne.jp","subject":"[PATCH 1/2] git-svn: enable \"svn.pathnameencoding\" on dcommit","fromName":"Kazutoshi Satoda","fromEmail":"k_satoda@f2.dion.ne.jp","sentAt":"2016-02-08T15:20:31Z","receivedAt":"2016-02-08T15:20:31Z","isPatch":true,"sender":{"key":"k_satoda@f2.dion.ne.jp","avatar":"https://avatars.githubusercontent.com/u/1337204?v=4"},"body":"Without the initialization of $self->{pathnameencoding}, conversion in\nrepo_path() is always skipped as $self->{pathnameencoding} is undefined\neven if \"svn.pathnameencoding\" is configured.\n\nThe lack of conversion results in mysterious failure of dcommit (e.g.\n\"Malformed XML\") which happen only when a commit involves a change on\nnon-ASCII path.\n\nSigned-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp>\n---\n perl/Git/SVN/Editor.pm | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/perl/Git/SVN/Editor.pm b/perl/Git/SVN/Editor.pm\nindex c50176e..d9d9bdf 100644\n--- a/perl/Git/SVN/Editor.pm\n+++ b/perl/Git/SVN/Editor.pm\n@@ -41,6 +41,7 @@ sub new {\n \t                       \"$self->{svn_path}/\" : '';\n \t$self->{config} = $opts->{config};\n \t$self->{mergeinfo} = $opts->{mergeinfo};\n+\t$self->{pathnameencoding} = Git::config('svn.pathnameencoding');\n \treturn $self;\n }\n \n-- \n2.7.0\n"},{"id":"277740","messageId":"56B8B25E.9000001@f2.dion.ne.jp","threadId":"41372","inReplyTo":"56B8B1EA.5020901@f2.dion.ne.jp","subject":"[PATCH 2/2] git-svn: apply \"svn.pathnameencoding\" before URL encoding","fromName":"Kazutoshi Satoda","fromEmail":"k_satoda@f2.dion.ne.jp","sentAt":"2016-02-08T15:21:02Z","receivedAt":"2016-02-08T15:21:02Z","isPatch":true,"sender":{"key":"k_satoda@f2.dion.ne.jp","avatar":"https://avatars.githubusercontent.com/u/1337204?v=4"},"body":"The conversion from \"svn.pathnameencoding\" to UTF-8 should be applied\nfirst, and then URL encoding should be applied on the resulting UTF-8\npath. The reversed order of these transforms (used before this fix)\nmakes non-UTF-8 URL which causes error from Subversion such as\n\"Filesystem has no item: '...' path not found\" when sending a rename (or\na copy) from non-ASCII path.\n\nSigned-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp>\n---\n perl/Git/SVN/Editor.pm | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/perl/Git/SVN/Editor.pm b/perl/Git/SVN/Editor.pm\nindex d9d9bdf..4c4199a 100644\n--- a/perl/Git/SVN/Editor.pm\n+++ b/perl/Git/SVN/Editor.pm\n@@ -144,11 +144,12 @@ sub repo_path {\n \n sub url_path {\n \tmy ($self, $path) = @_;\n+\t$path = $self->repo_path($path);\n \tif ($self->{url} =~ m#^https?://#) {\n \t\t# characters are taken from subversion/libsvn_subr/path.c\n \t\t$path =~ s#([^~a-zA-Z0-9_./!$&'()*+,-])#sprintf(\"%%%02X\",ord($1))#eg;\n \t}\n-\t$self->{url} . '/' . $self->repo_path($path);\n+\t$self->{url} . '/' . $path;\n }\n \n sub rmdirs {\n-- \n2.7.0\n"},{"id":"277785","messageId":"20160208225806.GA3487@dcvr.yhbt.net","threadId":"41372","inReplyTo":"56B8B1EA.5020901@f2.dion.ne.jp","subject":"Re: [PATCH 0/2] enable \"svn.pathnameencoding\" on dcommit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-02-08T22:58:06Z","receivedAt":"2016-02-08T22:58:06Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Kazutoshi Satoda <k_satoda@f2.dion.ne.jp> wrote:\n> I'm sorry not coming with test scripts, but I couldn't figure out how to\n> write tests to reproduce problems happen only with non-UTF-8 paths while\n> the tests seems to be run on UTF-8 locale.\n\nThank you.  I will try to work on some tests throughout the week\n(help appreciated!) but will be willing to push these up to Junio\nregardless.\n"},{"id":"278122","messageId":"20160215003009.GA19400@dcvr.yhbt.net","threadId":"41372","inReplyTo":"56B8B23F.2020901@f2.dion.ne.jp","subject":"Re: [PATCH 1/2] git-svn: enable \"svn.pathnameencoding\" on dcommit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-02-15T00:30:09Z","receivedAt":"2016-02-15T00:30:09Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Kazutoshi Satoda <k_satoda@f2.dion.ne.jp> wrote:\n> Signed-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp>\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\nThanks, it took me some time to figure out the test\ncase which I will amend:\n\ndiff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh\nindex 6a48e40..82222fd 100755\n--- a/t/t9115-git-svn-dcommit-funky-renames.sh\n+++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n@@ -77,11 +77,21 @@ test_expect_success 'make a commit to test rebase' '\n \t'\n \n test_expect_success 'git svn rebase works inside a fresh-cloned repository' '\n-\tcd test-rebase &&\n+\t(\n+\t\tcd test-rebase &&\n \t\tgit svn rebase &&\n \t\ttest -e test-rebase-main &&\n \t\ttest -e test-rebase\n-\t'\n+\t)'\n+\n+test_expect_success 'svn.pathnameencoding=cp932 new file on dcommit' '\n+\tneq=$(printf \"\\201\\202\") &&\n+\tgit config svn.pathnameencoding cp932 &&\n+\techo neq >\"$neq\" &&\n+\tgit add \"$neq\" &&\n+\tgit commit -m \"neq\" &&\n+\tgit svn dcommit\n+'\n \n stop_httpd\n \n-- \nEW\n"},{"id":"278123","messageId":"20160215003331.GA19436@dcvr.yhbt.net","threadId":"41372","inReplyTo":"56B8B25E.9000001@f2.dion.ne.jp","subject":"Re: [PATCH 2/2] git-svn: apply \"svn.pathnameencoding\" before URL encoding","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-02-15T00:33:31Z","receivedAt":"2016-02-15T00:33:31Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Kazutoshi Satoda <k_satoda@f2.dion.ne.jp> wrote:\n> The conversion from \"svn.pathnameencoding\" to UTF-8 should be applied\n> first, and then URL encoding should be applied on the resulting UTF-8\n> path. The reversed order of these transforms (used before this fix)\n> makes non-UTF-8 URL which causes error from Subversion such as\n> \"Filesystem has no item: '...' path not found\" when sending a rename (or\n> a copy) from non-ASCII path.\n> \n> Signed-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp>\n\nThanks, running full SVN tests now.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n> --- a/perl/Git/SVN/Editor.pm\n> +++ b/perl/Git/SVN/Editor.pm\n> @@ -144,11 +144,12 @@ sub repo_path {\n>  \n>  sub url_path {\n>  \tmy ($self, $path) = @_;\n> +\t$path = $self->repo_path($path);\n>  \tif ($self->{url} =~ m#^https?://#) {\n>  \t\t# characters are taken from subversion/libsvn_subr/path.c\n>  \t\t$path =~ s#([^~a-zA-Z0-9_./!$&'()*+,-])#sprintf(\"%%%02X\",ord($1))#eg;\n>  \t}\n> -\t$self->{url} . '/' . $self->repo_path($path);\n> +\t$self->{url} . '/' . $path;\n>  }\n\nThis is trickier to test, as it requires an https?:// URL.\nIt always succeeds with the default file:// URL.\n\ndiff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh\nindex 82222fd..9828f05 100755\n--- a/t/t9115-git-svn-dcommit-funky-renames.sh\n+++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n@@ -93,6 +93,18 @@ test_expect_success 'svn.pathnameencoding=cp932 new file on dcommit' '\n \tgit svn dcommit\n '\n \n+test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '\n+\tinf=$(printf \"\\201\\207\") &&\n+\tgit config svn.pathnameencoding cp932 &&\n+\techo inf >\"$inf\" &&\n+\tgit add \"$inf\" &&\n+\tgit commit -m \"inf\" &&\n+\tgit svn dcommit &&\n+\tgit mv \"$inf\" inf &&\n+\tgit commit -m \"inf rename\" &&\n+\tgit svn dcommit\n+'\n+\n stop_httpd\n \n test_done\n-- \nEW\n"},{"id":"278124","messageId":"20160215005210.GA31141@dcvr.yhbt.net","threadId":"41372","inReplyTo":"20160208225806.GA3487@dcvr.yhbt.net","subject":"[PULL] svn pathnameencoding for git svn dcommit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-02-15T00:52:10Z","receivedAt":"2016-02-15T00:52:10Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"I've amended tests to both commits, but the URL encoding one\nrequires an HTTP server to test effectively.\n\nI couldn't find a test prereq for httpd, but perhaps it's good\nto test by default regardless in case a future SVN changes\nfile:// behavior.  I've only tested this with SVN 1.6.17 under\nDebian wheezy.\n\nThe following changes since commit 6faf27b4ff26804a07363078b238b5cfd3dfa976:\n\n  Merge branch 'tb/conversion' into next (2016-02-12 10:20:20 -0800)\n\nare available in the git repository at:\n\n  git://bogomips.org/git-svn.git ks/svn-pathnameencoding\n\nfor you to fetch changes up to dfee0cf8123e7f63268f05a02731ce82db136188:\n\n  git-svn: apply \"svn.pathnameencoding\" before URL encoding (2016-02-15 00:31:21 +0000)\n\n----------------------------------------------------------------\nKazutoshi Satoda (2):\n      git-svn: enable \"svn.pathnameencoding\" on dcommit\n      git-svn: apply \"svn.pathnameencoding\" before URL encoding\n\n perl/Git/SVN/Editor.pm                   |  4 +++-\n t/t9115-git-svn-dcommit-funky-renames.sh | 26 ++++++++++++++++++++++++--\n 2 files changed, 27 insertions(+), 3 deletions(-)\n"},{"id":"278200","messageId":"xmqq4md9r771.fsf@gitster.mtv.corp.google.com","threadId":"41372","inReplyTo":"20160215005210.GA31141@dcvr.yhbt.net","subject":"Re: [PULL] svn pathnameencoding for git svn dcommit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-02-15T21:32:02Z","receivedAt":"2016-02-15T21:32:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> I've amended tests to both commits, but the URL encoding one\n> requires an HTTP server to test effectively.\n>\n> I couldn't find a test prereq for httpd, but perhaps it's good\n> to test by default regardless in case a future SVN changes\n> file:// behavior.  I've only tested this with SVN 1.6.17 under\n> Debian wheezy.\n>\n> The following changes since commit 6faf27b4ff26804a07363078b238b5cfd3dfa976:\n>\n>   Merge branch 'tb/conversion' into next (2016-02-12 10:20:20 -0800)\n>\n> are available in the git repository at:\n>\n>   git://bogomips.org/git-svn.git ks/svn-pathnameencoding\n>\n> for you to fetch changes up to dfee0cf8123e7f63268f05a02731ce82db136188:\n>\n>   git-svn: apply \"svn.pathnameencoding\" before URL encoding (2016-02-15 00:31:21 +0000)\n\nSorry, Eric, I cannot pull this.  You made your branch on top of\n'next', there are many commits that are not ready.\n\n>\n> ----------------------------------------------------------------\n> Kazutoshi Satoda (2):\n>       git-svn: enable \"svn.pathnameencoding\" on dcommit\n>       git-svn: apply \"svn.pathnameencoding\" before URL encoding\n>\n>  perl/Git/SVN/Editor.pm                   |  4 +++-\n>  t/t9115-git-svn-dcommit-funky-renames.sh | 26 ++++++++++++++++++++++++--\n>  2 files changed, 27 insertions(+), 3 deletions(-)\n"},{"id":"278268","messageId":"56C297A9.2080705@f2.dion.ne.jp","threadId":"41372","inReplyTo":"20160215005210.GA31141@dcvr.yhbt.net","subject":"Re: [PULL] svn pathnameencoding for git svn dcommit","fromName":"Kazutoshi Satoda","fromEmail":"k_satoda@f2.dion.ne.jp","sentAt":"2016-02-16T03:29:45Z","receivedAt":"2016-02-16T03:29:45Z","isPatch":false,"sender":{"key":"k_satoda@f2.dion.ne.jp","avatar":"https://avatars.githubusercontent.com/u/1337204?v=4"},"body":"On 2016/02/15 9:52 +0900, Eric Wong wrote:\n> I've amended tests to both commits, but the URL encoding one\n> requires an HTTP server to test effectively.\n\nThank you for the tests. But, on my environment, both of them failed\nunexpectedly. (Windows 7 SP1, x86_64 Cygwin, LANG=ja_JP.UTF-8)\n\nFor now, I don't have enough time to investigate this further. Let me\njust share the result.\n\n> $ ./t9115-git-svn-dcommit-funky-renames.sh -x --run='11-12'\n(snip)\n> expecting success:\n>         neq=$(printf \"\\201\\202\") &&\n>         git config svn.pathnameencoding cp932 &&\n>         echo neq >\"$neq\" &&\n>         git add \"$neq\" &&\n>         git commit -m \"neq\" &&\n>         git svn dcommit\n>\n> +++ printf '\\201\\202'\n> ++ neq=$'\\201\\202'\n> ++ git config svn.pathnameencoding cp932\n> ++ echo neq\n> ++ git add $'\\201\\202'\n> ++ git commit -m neq\n> On branch master\n>\n> Initial commit\n>\n> Untracked files:\n>         svnrepo/\n>         \"\\357\\202\\201\\357\\202\\202\"\n>\n> nothing added to commit but untracked files present\n> error: last command exited with $?=1\n> not ok 11 - svn.pathnameencoding=cp932 new file on dcommit\n> #\n> #               neq=$(printf \"\\201\\202\") &&\n> #               git config svn.pathnameencoding cp932 &&\n> #               echo neq >\"$neq\" &&\n> #               git add \"$neq\" &&\n> #               git commit -m \"neq\" &&\n> #               git svn dcommit\n> #\n>\n> expecting success:\n>         inf=$(printf \"\\201\\207\") &&\n>         git config svn.pathnameencoding cp932 &&\n>         echo inf >\"$inf\" &&\n>         git add \"$inf\" &&\n>         git commit -m \"inf\" &&\n>         git svn dcommit &&\n>         git mv \"$inf\" inf &&\n>         git commit -m \"inf rename\" &&\n>         git svn dcommit\n>\n> +++ printf '\\201\\207'\n> ++ inf=$'\\201\\207'\n> ++ git config svn.pathnameencoding cp932\n> ++ echo inf\n> ++ git add $'\\201\\207'\n> ++ git commit -m inf\n> On branch master\n>\n> Initial commit\n>\n> Untracked files:\n>         svnrepo/\n>         \"\\357\\202\\201\\357\\202\\202\"\n>         \"\\357\\202\\201\\357\\202\\207\"\n>\n> nothing added to commit but untracked files present\n> error: last command exited with $?=1\n> not ok 12 - svn.pathnameencoding=cp932 rename on dcommit\n> #\n> #               inf=$(printf \"\\201\\207\") &&\n> #               git config svn.pathnameencoding cp932 &&\n> #               echo inf >\"$inf\" &&\n> #               git add \"$inf\" &&\n> #               git commit -m \"inf\" &&\n> #               git svn dcommit &&\n> #               git mv \"$inf\" inf &&\n> #               git commit -m \"inf rename\" &&\n> #               git svn dcommit\n> #\n\nStrangely, after the test failure, \"git status\" in the trash directory\nreports different status.\n> $ cd 'trash directory.t9115-git-svn-dcommit-funky-renames'\n> $ git status\n> On branch master\n>\n> Initial commit\n>\n> Untracked files:\n>   (use \"git add <file>...\" to include in what will be committed)\n>\n>         svnrepo/\n>         \"\\201\\202\"\n>         \"\\201\\207\"\n>\n> nothing added to commit but untracked files present (use \"git add\" to track)\n\nI can manually add and commit them.\n> $ neq=$(printf \"\\201\\202\")\n> $ git add \"$neq\"\n> $ git commit -m \"neq\"\n> [master (root-commit) 3fd464f] neq\n>  1 file changed, 1 insertion(+)\n>  create mode 100644 \"\\201\\202\"\n\nI can't see how \"\\357\\202\\201\\357\\202\\202\" came as output in the test.\n\n-- \nk_satoda\n"},{"id":"278282","messageId":"20160216063357.GA17455@dcvr.yhbt.net","threadId":"41372","inReplyTo":"56C297A9.2080705@f2.dion.ne.jp","subject":"Re: [PULL] svn pathnameencoding for git svn dcommit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-02-16T06:33:57Z","receivedAt":"2016-02-16T06:33:57Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio, sorry about basing on next, I somehow\nthought I was going to need to depend on something there.\nUpdated pull below if Kazutoshi can run the test effectively.\n\nKazutoshi Satoda <k_satoda@f2.dion.ne.jp> wrote:\n> Thank you for the tests. But, on my environment, both of them failed\n> unexpectedly. (Windows 7 SP1, x86_64 Cygwin, LANG=ja_JP.UTF-8)\n> \n> For now, I don't have enough time to investigate this further. Let me\n> just share the result.\n\n<snip>\n\n> > Untracked files:\n> >         svnrepo/\n> >         \"\\357\\202\\201\\357\\202\\202\"\n> >         \"\\357\\202\\201\\357\\202\\207\"\n> >\n\n<snip>\n\n> I can't see how \"\\357\\202\\201\\357\\202\\202\" came as output in the test.\n\nI wonder if it's a shell or printf portability problem.  I've\nrepushed the branch against master and implemented the weird\ncharacter use inside Perl scripts.\n\nCan you give it a try?\n\nThe following changes since commit 494398473714dcbedb38b1ac79b531c7384b3bc4:\n\n  Sixth batch for the 2.8 cycle (2016-02-10 14:24:14 -0800)\n\nare available in the git repository at:\n\n  git://bogomips.org/git-svn.git ks/svn-pathnameencoding\n\nfor you to fetch changes up to 7d7ea44ea5a1a38ee36402e6709e64c05650ba46:\n\n  git-svn: apply \"svn.pathnameencoding\" before URL encoding (2016-02-16 06:25:01 +0000)\n\n----------------------------------------------------------------\nKazutoshi Satoda (2):\n      git-svn: enable \"svn.pathnameencoding\" on dcommit\n      git-svn: apply \"svn.pathnameencoding\" before URL encoding\n\n perl/Git/SVN/Editor.pm                   |  4 +++-\n t/t9115-git-svn-dcommit-funky-renames.sh | 16 ++++++++++++++--\n t/t9115/inf.perl                         | 12 ++++++++++++\n t/t9115/neq.perl                         |  5 +++++\n 4 files changed, 34 insertions(+), 3 deletions(-)\n create mode 100644 t/t9115/inf.perl\n create mode 100644 t/t9115/neq.perl\n\n t/t9115-git-svn-dcommit-funky-renames.sh | 16 +++-------------\n t/t9115/inf.perl                         | 12 ++++++++++++\n t/t9115/neq.perl                         |  5 +++++\n 3 files changed, 20 insertions(+), 13 deletions(-)\n\nInterdiff of test changes:\n\ndiff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh\nindex 9828f05..94698fe 100755\n--- a/t/t9115-git-svn-dcommit-funky-renames.sh\n+++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n@@ -84,25 +84,15 @@ test_expect_success 'git svn rebase works inside a fresh-cloned repository' '\n \t\ttest -e test-rebase\n \t)'\n \n-test_expect_success 'svn.pathnameencoding=cp932 new file on dcommit' '\n-\tneq=$(printf \"\\201\\202\") &&\n+test_expect_success PERL 'svn.pathnameencoding=cp932 new file on dcommit' '\n \tgit config svn.pathnameencoding cp932 &&\n-\techo neq >\"$neq\" &&\n-\tgit add \"$neq\" &&\n+\t\"$PERL_PATH\" -w \"$TEST_DIRECTORY\"/t9115/neq.perl &&\n \tgit commit -m \"neq\" &&\n \tgit svn dcommit\n '\n \n test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '\n-\tinf=$(printf \"\\201\\207\") &&\n-\tgit config svn.pathnameencoding cp932 &&\n-\techo inf >\"$inf\" &&\n-\tgit add \"$inf\" &&\n-\tgit commit -m \"inf\" &&\n-\tgit svn dcommit &&\n-\tgit mv \"$inf\" inf &&\n-\tgit commit -m \"inf rename\" &&\n-\tgit svn dcommit\n+\t\"$PERL_PATH\" -w \"$TEST_DIRECTORY\"/t9115/inf.perl\n '\n \n stop_httpd\ndiff --git a/t/t9115/inf.perl b/t/t9115/inf.perl\nnew file mode 100644\nindex 0000000..0adcfc7\n--- /dev/null\n+++ b/t/t9115/inf.perl\n@@ -0,0 +1,12 @@\n+use strict;\n+my $path = \"\\201\\207\";\n+open my $fh, '>', $path or die $!;\n+close $fh or die $!;\n+sub run { system(@_) == 0 or die join(' ', @_) . \": $?\" }\n+run(qw(git config svn.pathnameencoding cp932));\n+run(qw(git add), $path);\n+run(qw(git commit -m inf));\n+run(qw(git svn dcommit));\n+run(qw(git mv), $path, 'inf');\n+run(qw(git commit -m inf-rename));\n+run(qw(git svn dcommit));\ndiff --git a/t/t9115/neq.perl b/t/t9115/neq.perl\nnew file mode 100644\nindex 0000000..91b1061\n--- /dev/null\n+++ b/t/t9115/neq.perl\n@@ -0,0 +1,5 @@\n+use strict;\n+my $path = \"\\201\\202\";\n+open my $fh, '>', $path or die $!;\n+close $fh or die $!;\n+exec(qw(git add), $path);\n"},{"id":"278362","messageId":"56C34BFF.3030301@f2.dion.ne.jp","threadId":"41372","inReplyTo":"20160216063357.GA17455@dcvr.yhbt.net","subject":"Re: [PULL] svn pathnameencoding for git svn dcommit","fromName":"Kazutoshi Satoda","fromEmail":"k_satoda@f2.dion.ne.jp","sentAt":"2016-02-16T16:19:11Z","receivedAt":"2016-02-16T16:19:11Z","isPatch":false,"sender":{"key":"k_satoda@f2.dion.ne.jp","avatar":"https://avatars.githubusercontent.com/u/1337204?v=4"},"body":"On 2016/02/16 15:33 +0900, Eric Wong wrote:\n> Kazutoshi Satoda <k_satoda@f2.dion.ne.jp> wrote:\n>> Thank you for the tests. But, on my environment, both of them failed\n>> unexpectedly. (Windows 7 SP1, x86_64 Cygwin, LANG=ja_JP.UTF-8)\n...\n>> > Untracked files:\n>> >         svnrepo/\n>> >         \"\\357\\202\\201\\357\\202\\202\"\n>> >         \"\\357\\202\\201\\357\\202\\207\"\n...\n>> I can't see how \"\\357\\202\\201\\357\\202\\202\" came as output in the test.\n> \n> I wonder if it's a shell or printf portability problem.  I've\n> repushed the branch against master and implemented the weird\n> character use inside Perl scripts.\n> \n> Can you give it a try?\n\n(Shouldn't the branch be based on maint, as these are bugfixes?)\n\nThank you. I tried it but got similar problem:\n> $ ./t9115-git-svn-dcommit-funky-renames.sh -x --run='11-12'\n(snip)\n> expecting success:\n>         git config svn.pathnameencoding cp932 &&\n>         \"$PERL_PATH\" -w \"$TEST_DIRECTORY\"/t9115/neq.perl &&\n>         git commit -m \"neq\" &&\n>         git svn dcommit\n>\n> ++ git config svn.pathnameencoding cp932\n> ++ /usr/bin/perl -w /home/k_satoda/project/git/t/t9115/neq.perl\n> ++ git commit -m neq\n> On branch master\n>\n> Initial commit\n>\n> Untracked files:\n>         svnrepo/\n>         \"\\357\\202\\201\\357\\202\\202\"\n>\n> nothing added to commit but untracked files present\n> error: last command exited with $?=1\n> not ok 11 - svn.pathnameencoding=cp932 new file on dcommit\n> #\n> #               git config svn.pathnameencoding cp932 &&\n> #               \"$PERL_PATH\" -w \"$TEST_DIRECTORY\"/t9115/neq.perl &&\n> #               git commit -m \"neq\" &&\n> #               git svn dcommit\n> #\n>\n> expecting success:\n>         \"$PERL_PATH\" -w \"$TEST_DIRECTORY\"/t9115/inf.perl\n>\n> ++ /usr/bin/perl -w /home/k_satoda/project/git/t/t9115/inf.perl\n> On branch master\n>\n> Initial commit\n>\n> Untracked files:\n>         svnrepo/\n>         \"\\357\\202\\201\\357\\202\\202\"\n>         \"\\357\\202\\201\\357\\202\\207\"\n>\n> nothing added to commit but untracked files present\n> git commit -m inf: 256 at /home/k_satoda/project/git/t/t9115/inf.perl line 5.\n> error: last command exited with $?=1\n> not ok 12 - svn.pathnameencoding=cp932 rename on dcommit\n> #\n> #               \"$PERL_PATH\" -w \"$TEST_DIRECTORY\"/t9115/inf.perl\n> #\n\n\nI found how \"\\357\\202\\201\\357\\202\\202\" (U+F081 U+F082 in UTF-8) could\ncome.\nhttps://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars\n> Some characters are disallowed in filenames on Windows filesystems. ...\n...\n> ... All of the above characters, except for the backslash, are converted\n> to special UNICODE characters in the range 0xf000 to 0xf0ff (the\n> \"Private use area\") when creating or accessing files.\n\"U+F081 U+F082\" seems the result of conversion from \"0x8182\" (neq in\ncp932) as treating each of 2 bytes as disallowed characters.\n\nAnd I also noticed that LANG and LC_ALL is set to \"C\" in test-lib.sh.\n\nSetting LC_ALL=C.UTF-8 in the test 11-12 made them pass on Cygwin.\nSame change made the previous version also pass. Please find the patch\nin the attached output of git format-patch.\n\nCould you please test with this on non-Cygwin environment?\n\nIf it made no harm, please tell me what should I do to proceed this patch.\nWill you (Eric) please make further integration? Shall I make another\nseries (v2) of patches?\n\n-- \nk_satoda\n\n\n>From 7b827f2d65aaa859030ba5b08055020f2bda1f0f Mon Sep 17 00:00:00 2001\nFrom: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp>\nDate: Wed, 17 Feb 2016 00:29:24 +0900\nSubject: [PATCH] Add LC_ALL=C.UTF-8 in t9115-git-svn-dcommit-funky-renames.sh\n\nThis makes the test 11-12 pass on Cygwin.\n---\n t/t9115-git-svn-dcommit-funky-renames.sh | 11 +++++++++++\n 1 file changed, 11 insertions(+)\n\ndiff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh\nindex 9828f05..59d086b 100755\n--- a/t/t9115-git-svn-dcommit-funky-renames.sh\n+++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n@@ -84,7 +84,16 @@ test_expect_success 'git svn rebase works inside a fresh-cloned repository' '\n \t\ttest -e test-rebase\n \t)'\n \n+# Without this, LC_ALL=C as set in test-lib.sh, and Cygwin converts\n+# non-ASCII characters in filenames unexpectedly, and causes errors.\n+# https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars\n+# > Some characters are disallowed in filenames on Windows filesystems. ...\n+# ...\n+# > ... All of the above characters, except for the backslash, are converted\n+# > to special UNICODE characters in the range 0xf000 to 0xf0ff (the\n+# > \"Private use area\") when creating or accessing files.\n test_expect_success 'svn.pathnameencoding=cp932 new file on dcommit' '\n+\texport LC_ALL=C.UTF-8 &&\n \tneq=$(printf \"\\201\\202\") &&\n \tgit config svn.pathnameencoding cp932 &&\n \techo neq >\"$neq\" &&\n@@ -93,7 +102,9 @@ test_expect_success 'svn.pathnameencoding=cp932 new file on dcommit' '\n \tgit svn dcommit\n '\n \n+# See the comment on the above test for setting of LC_ALL.\n test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '\n+\texport LC_ALL=C.UTF-8 &&\n \tinf=$(printf \"\\201\\207\") &&\n \tgit config svn.pathnameencoding cp932 &&\n \techo inf >\"$inf\" &&\n-- \n2.7.0\n\n"},{"id":"278744","messageId":"20160220233743.GA28606@dcvr.yhbt.net","threadId":"41372","inReplyTo":"56C34BFF.3030301@f2.dion.ne.jp","subject":"Re: [PULL] svn pathnameencoding for git svn dcommit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-02-20T23:37:43Z","receivedAt":"2016-02-20T23:37:43Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Kazutoshi Satoda <k_satoda@f2.dion.ne.jp> wrote:\n> (Shouldn't the branch be based on maint, as these are bugfixes?)\n\nI'm not sure if it being previously left-out/untested feature\nwould qualify for maint.  Maybe it does, but I suppose I'll let\nJunio decide.\n\n> Thank you. I tried it but got similar problem:\n\n<snip>\n\n> I found how \"\\357\\202\\201\\357\\202\\202\" (U+F081 U+F082 in UTF-8) could\n> come.\n> https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars\n> > Some characters are disallowed in filenames on Windows filesystems. ...\n> ...\n> > ... All of the above characters, except for the backslash, are converted\n> > to special UNICODE characters in the range 0xf000 to 0xf0ff (the\n> > \"Private use area\") when creating or accessing files.\n> \"U+F081 U+F082\" seems the result of conversion from \"0x8182\" (neq in\n> cp932) as treating each of 2 bytes as disallowed characters.\n> \n> And I also noticed that LANG and LC_ALL is set to \"C\" in test-lib.sh.\n> \n> Setting LC_ALL=C.UTF-8 in the test 11-12 made them pass on Cygwin.\n> Same change made the previous version also pass. Please find the patch\n> in the attached output of git format-patch.\n\nThanks.  However, I also wonder what happens on machines without\n\"C.UTF-8\" support (are there still any?).\n\n> Could you please test with this on non-Cygwin environment?\n\nWorks for me, at least.  I've squashed your changes into the two\npatches already queued up.  I needed to split the\n\"export LC_ALL=C.UTF-8\" statement into\n\"LC_ALL=C.UTF-8 && export LC_ALL\" for portability.\n\n> If it made no harm, please tell me what should I do to proceed this patch.\n> Will you (Eric) please make further integration? Shall I make another\n> series (v2) of patches?\n\nI've pushed out a new branch with your LC_ALL changes squashed\nin.  However I'm unsure if there's any new portability problems\nwith LC_ALL=C.UTF-8...\n\nJunio or anyone else: thoughts?\n\nThe following changes since commit 0233b800c838ddda41db318ee396320b3c21a560:\n\n  Merge branch 'maint' (2016-02-17 10:14:39 -0800)\n\nare available in the git repository at:\n\n  git://bogomips.org/git-svn.git ks/svn-pathnameencoding-3\n\nfor you to fetch changes up to 980c083276ba06a9400c5b1b2558c3626bcff969:\n\n  git-svn: apply \"svn.pathnameencoding\" before URL encoding (2016-02-20 23:30:16 +0000)\n\n----------------------------------------------------------------\nKazutoshi Satoda (2):\n      git-svn: enable \"svn.pathnameencoding\" on dcommit\n      git-svn: apply \"svn.pathnameencoding\" before URL encoding\n\n perl/Git/SVN/Editor.pm                   |  4 +++-\n t/t9115-git-svn-dcommit-funky-renames.sh | 39 ++++++++++++++++++++++++++++++--\n 2 files changed, 40 insertions(+), 3 deletions(-)\n"},{"id":"278767","messageId":"56C9B7B7.7030406@f2.dion.ne.jp","threadId":"41372","inReplyTo":"20160220233743.GA28606@dcvr.yhbt.net","subject":"Re: [PULL] svn pathnameencoding for git svn dcommit","fromName":"Kazutoshi Satoda","fromEmail":"k_satoda@f2.dion.ne.jp","sentAt":"2016-02-21T13:12:23Z","receivedAt":"2016-02-21T13:12:23Z","isPatch":false,"sender":{"key":"k_satoda@f2.dion.ne.jp","avatar":"https://avatars.githubusercontent.com/u/1337204?v=4"},"body":"On 2016/02/21 8:37 +0900, Eric Wong wrote:\n> Kazutoshi Satoda <k_satoda@f2.dion.ne.jp> wrote:\n...\n>> Setting LC_ALL=C.UTF-8 in the test 11-12 made them pass on Cygwin.\n>> Same change made the previous version also pass. Please find the patch\n>> in the attached output of git format-patch.\n> \n> Thanks.  However, I also wonder what happens on machines without\n> \"C.UTF-8\" support (are there still any?).\n> \n>> Could you please test with this on non-Cygwin environment?\n> \n> Works for me, at least.  I've squashed your changes into the two\n> patches already queued up.  I needed to split the\n> \"export LC_ALL=C.UTF-8\" statement into\n> \"LC_ALL=C.UTF-8 && export LC_ALL\" for portability.\n\nThank you.\n\n>> If it made no harm, please tell me what should I do to proceed this patch.\n>> Will you (Eric) please make further integration? Shall I make another\n>> series (v2) of patches?\n> \n> I've pushed out a new branch with your LC_ALL changes squashed\n> in.  However I'm unsure if there's any new portability problems\n> with LC_ALL=C.UTF-8...\n> \n> Junio or anyone else: thoughts?\n\nThe test passed on my environment.\n\nI've searched use of LC_ALL values other than \"C\".\nIt seems be the best to move the variable a_utf8_locale in t9129 to\nlib-git-svn.sh and use it also in t9115.\n\n\nt/Makefile:83\n> \t$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8\n\nHere, \"en_US.UTF-8\" is hard-coded. I think this is at least more\nproblematic than hard-coding \"C.UTF-8\". Beside hard-coding, does this\ntake effect while test-lib.sh does LC_ALL=C ?\n\nt/t9129-git-svn-i18n-commitencoding.sh:17\n> a_utf8_locale=$(locale -a | sed -n '/\\.[uU][tT][fF]-*8$/{\n> \tp\n> \tq\n> }')\n>\n> if test -n \"$a_utf8_locale\"\n> then\n> \ttest_set_prereq UTF8\n> else\n> \tsay \"# UTF-8 locale not available, some tests are skipped\"\n> fi\n\nHere, a UTF-8 locale is took from \"locale -a\", and the test is skipped\nif not found. This gives \"a_utf8_locale=C.utf8\" on my Cygwin\nenvironment. There was a record that says the difference of \".utf8\" and\n\".UTF-8\" caused a failure.\nhttps://git.kernel.org/cgit/git/git.git/commit/?id=2de03ebe0635c93e182c3367140f999e79bdadcd\n\nt/lib-gettext.sh:17\n> \t# is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian\n> \tis_IS_locale=$(locale -a 2>/dev/null |\n> \t\tsed -n '/^is_IS\\.[uU][tT][fF]-*8$/{\n> \t\tp\n> \t\tq\n> \t}')\n...\n> \tif test -n \"$is_IS_locale\" &&\n> \t\ttest $GIT_INTERNAL_GETTEXT_SH_SCHEME != \"fallthrough\"\n> \tthen\n> \t\t# Some of the tests need the reference Icelandic locale\n> \t\ttest_set_prereq GETTEXT_LOCALE\n...\n> \telse\n> \t\tsay \"# lib-gettext: No is_IS UTF-8 locale available\"\n> \tfi\n(the same logic is used for is_IS.ISO8859-1.)\n\nHere, a UTF-8 locale with hard coded \"is_IS\" is took from \"locale -a\",\nand the test is skipped if not found. This gives\n\"is_IS_locale=is_IS.utf8.utf8\" on my Cygwin environment.\n\n-- \nk_satoda\n"},{"id":"279659","messageId":"1456597724-26497-1-git-send-email-tboegi@web.de","threadId":"41372","inReplyTo":"20160208225806.GA3487@dcvr.yhbt.net","subject":"[PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"","fromEmail":"tboegi@web.de","sentAt":"2016-02-27T18:28:44Z","receivedAt":"2016-02-27T18:28:44Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"From: Torsten Bögershausen <tboegi@web.de>\n\nHFS+ under Mac OS X doesn't allow file names like \"\\201\\207\",\nso skip the tests using cp932.\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n t/t9115-git-svn-dcommit-funky-renames.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh\nindex 0990f8d..805a9eb 100755\n--- a/t/t9115-git-svn-dcommit-funky-renames.sh\n+++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n@@ -93,7 +93,7 @@ test_expect_success 'git svn rebase works inside a fresh-cloned repository' '\n # > to special UNICODE characters in the range 0xf000 to 0xf0ff (the\n # > \"Private use area\") when creating or accessing files.\n prepare_a_utf8_locale\n-test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n+test_expect_success !UTF8_NFD_TO_NFC,UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n \tLC_ALL=$a_utf8_locale &&\n \texport LC_ALL &&\n \tneq=$(printf \"\\201\\202\") &&\n@@ -105,10 +105,10 @@ test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n '\n \n # See the comment on the above test for setting of LC_ALL.\n-test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '\n+test_expect_success !UTF8_NFD_TO_NFC,UTF8 'svn.pathnameencoding=cp932 rename on dcommit' '\n \tLC_ALL=$a_utf8_locale &&\n \texport LC_ALL &&\n-\tinf=$(printf \"\\201\\207\") &&\n+\tinf=$(printf \"\\201\\207\"o) &&\n \tgit config svn.pathnameencoding cp932 &&\n \techo inf >\"$inf\" &&\n \tgit add \"$inf\" &&\n-- \n2.7.0.303.g2c4f448.dirty\n"},{"id":"279682","messageId":"20160228045945.GA14289@dcvr.yhbt.net","threadId":"41372","inReplyTo":"1456597724-26497-1-git-send-email-tboegi@web.de","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-02-28T04:59:45Z","receivedAt":"2016-02-28T04:59:45Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"tboegi@web.de wrote:\n> --- a/t/t9115-git-svn-dcommit-funky-renames.sh\n> +++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n> @@ -93,7 +93,7 @@ test_expect_success 'git svn rebase works inside a fresh-cloned repository' '\n>  # > to special UNICODE characters in the range 0xf000 to 0xf0ff (the\n>  # > \"Private use area\") when creating or accessing files.\n>  prepare_a_utf8_locale\n> -test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n> +test_expect_success !UTF8_NFD_TO_NFC,UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n\nPlease keep lines wrapped at 80 cols or less.\n(I need big fonts)\n\n> @@ -105,10 +105,10 @@ test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n>  '\n>  \n>  # See the comment on the above test for setting of LC_ALL.\n> -test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '\n> +test_expect_success !UTF8_NFD_TO_NFC,UTF8 'svn.pathnameencoding=cp932 rename on dcommit' '\n>  \tLC_ALL=$a_utf8_locale &&\n>  \texport LC_ALL &&\n> -\tinf=$(printf \"\\201\\207\") &&\n> +\tinf=$(printf \"\\201\\207\"o) &&\n\nWhy the extra 'o'?\n\n>  \tgit config svn.pathnameencoding cp932 &&\n>  \techo inf >\"$inf\" &&\n>  \tgit add \"$inf\" &&\n> -- \n"},{"id":"279720","messageId":"56D333F1.9050905@web.de","threadId":"41372","inReplyTo":"20160228045945.GA14289@dcvr.yhbt.net","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-02-28T17:52:49Z","receivedAt":"2016-02-28T17:52:49Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 28.02.16 05:59, Eric Wong wrote:\n> tboegi@web.de wrote:\n> Please keep lines wrapped at 80 cols or less.\n> (I need big fonts)\nOK\n> \n>> @@ -105,10 +105,10 @@ test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n>>  '\n> Why the extra 'o'?\nThat shouldn't be there, sorry.\nWill send V2...\n"},{"id":"280756","messageId":"20160315015954.GB25295@dcvr.yhbt.net","threadId":"41372","inReplyTo":"56D333F1.9050905@web.de","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-03-15T01:59:54Z","receivedAt":"2016-03-15T01:59:54Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Torsten Bögershausen <tboegi@web.de> wrote:\n> On 28.02.16 05:59, Eric Wong wrote:\n> > tboegi@web.de wrote:\n> > Please keep lines wrapped at 80 cols or less.\n> > (I need big fonts)\n> OK\n> > \n> >> @@ -105,10 +105,10 @@ test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n> >>  '\n> > Why the extra 'o'?\n> That shouldn't be there, sorry.\n> Will send V2...\n\nI just edited locally and pushed those out to Junio:\n\nhttp://mid.gmane.org/20160315015726.GA25295@dcvr.yhbt.net\n"},{"id":"280759","messageId":"56E79C54.8000606@web.de","threadId":"41372","inReplyTo":"20160315015954.GB25295@dcvr.yhbt.net","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-03-15T05:23:32Z","receivedAt":"2016-03-15T05:23:32Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 03/15/2016 02:59 AM, Eric Wong wrote:\n> []\n> I just edited locally and pushed those out to Junio:\n>\n> http://mid.gmane.org/20160315015726.GA25295@dcvr.yhbt.net\n>\n\nThe new TC 11/12 don't pass under cygwin.\n\nDo we need cp932 ?\n\nIf not, we may use the paych from here:\nhttps://github.com/tboegi/git/commit/379c01bf52464f8a50065b11af516127e9144045\n\nDate:   Tue Mar 15 05:03:18 2016 +0100\n\n     t9115: Use funcky file names that work under unicode FS\n\n     Don't use funky file names, that can not be created under\n     HFS or NTFS.\n\ndiff --git a/t/t9115-git-svn-dcommit-funky-renames.sh \nb/t/t9115-git-svn-dcommit-funky-renames.sh\nindex 0990f8d..d022f0d 100755\n--- a/t/t9115-git-svn-dcommit-funky-renames.sh\n+++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n@@ -93,11 +93,11 @@ test_expect_success 'git svn rebase works inside a \nfresh-cloned repository' '\n  # > to special UNICODE characters in the range 0xf000 to 0xf0ff (the\n  # > \"Private use area\") when creating or accessing files.\n  prepare_a_utf8_locale\n-test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n+test_expect_success UTF8 'svn.pathnameencoding=ISO8859-1 new file on dcommit' '\n         LC_ALL=$a_utf8_locale &&\n         export LC_ALL &&\n-       neq=$(printf \"\\201\\202\") &&\n-       git config svn.pathnameencoding cp932 &&\n+       neq=$(printf \"\\303\\244\") &&\n+       git config svn.pathnameencoding ISO8859-1 &&\n         echo neq >\"$neq\" &&\n         git add \"$neq\" &&\n         git commit -m \"neq\" &&\n@@ -105,11 +105,11 @@ test_expect_success UTF8 'svn.pathnameencoding=cp932 new \nfile on dcommit' '\n  '\n\n  # See the comment on the above test for setting of LC_ALL.\n-test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '\n+test_expect_success 'svn.pathnameencoding=ISO8859-1 rename on dcommit' '\n         LC_ALL=$a_utf8_locale &&\n         export LC_ALL &&\n-       inf=$(printf \"\\201\\207\") &&\n-       git config svn.pathnameencoding cp932 &&\n+       inf=$(printf \"\\303\\226\") &&\n+       git config svn.pathnameencoding ISO8859-1 &&\n         echo inf >\"$inf\" &&\n         git add \"$inf\" &&\n         git commit -m \"inf\" &&\n"},{"id":"280764","messageId":"20160315070930.GA24036@dcvr.yhbt.net","threadId":"41372","inReplyTo":"56E79C54.8000606@web.de","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-03-15T07:09:30Z","receivedAt":"2016-03-15T07:09:30Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Torsten Bögershausen <tboegi@web.de> wrote:\n> On 03/15/2016 02:59 AM, Eric Wong wrote:\n> >[]\n> >I just edited locally and pushed those out to Junio:\n> >\n> >http://mid.gmane.org/20160315015726.GA25295@dcvr.yhbt.net\n> >\n> \n> The new TC 11/12 don't pass under cygwin.\n> \n> Do we need cp932 ?\n\nNot sure, both CP932 and ISO8859-1 work fine for me on\nGNU/Linux.   Anyways I'm fine skipping this patch for 2.8\nwhile we hash it out, too.\n\nKazutoshi: can you answer?  Thanks.\n\n> If not, we may use the paych from here:\n> https://github.com/tboegi/git/commit/379c01bf52464f8a50065b11af516127e9144045\n> \n> Date:   Tue Mar 15 05:03:18 2016 +0100\n> \n>     t9115: Use funcky file names that work under unicode FS\n> \n>     Don't use funky file names, that can not be created under\n>     HFS or NTFS.\n> \n> diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh\n> b/t/t9115-git-svn-dcommit-funky-renames.sh\n> index 0990f8d..d022f0d 100755\n> --- a/t/t9115-git-svn-dcommit-funky-renames.sh\n> +++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n> @@ -93,11 +93,11 @@ test_expect_success 'git svn rebase works inside\n> a fresh-cloned repository' '\n>  # > to special UNICODE characters in the range 0xf000 to 0xf0ff (the\n>  # > \"Private use area\") when creating or accessing files.\n>  prepare_a_utf8_locale\n> -test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n> +test_expect_success UTF8 'svn.pathnameencoding=ISO8859-1 new file on dcommit' '\n>         LC_ALL=$a_utf8_locale &&\n>         export LC_ALL &&\n> -       neq=$(printf \"\\201\\202\") &&\n> -       git config svn.pathnameencoding cp932 &&\n> +       neq=$(printf \"\\303\\244\") &&\n> +       git config svn.pathnameencoding ISO8859-1 &&\n>         echo neq >\"$neq\" &&\n>         git add \"$neq\" &&\n>         git commit -m \"neq\" &&\n> @@ -105,11 +105,11 @@ test_expect_success UTF8\n> 'svn.pathnameencoding=cp932 new file on dcommit' '\n>  '\n> \n>  # See the comment on the above test for setting of LC_ALL.\n> -test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '\n> +test_expect_success 'svn.pathnameencoding=ISO8859-1 rename on dcommit' '\n>         LC_ALL=$a_utf8_locale &&\n>         export LC_ALL &&\n> -       inf=$(printf \"\\201\\207\") &&\n> -       git config svn.pathnameencoding cp932 &&\n> +       inf=$(printf \"\\303\\226\") &&\n> +       git config svn.pathnameencoding ISO8859-1 &&\n>         echo inf >\"$inf\" &&\n>         git add \"$inf\" &&\n>         git commit -m \"inf\" &&\n> \n"},{"id":"280931","messageId":"56E999C3.4040802@f2.dion.ne.jp","threadId":"41372","inReplyTo":"20160315070930.GA24036@dcvr.yhbt.net","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Kazutoshi Satoda","fromEmail":"k_satoda@f2.dion.ne.jp","sentAt":"2016-03-16T17:37:07Z","receivedAt":"2016-03-16T17:37:07Z","isPatch":true,"sender":{"key":"k_satoda@f2.dion.ne.jp","avatar":"https://avatars.githubusercontent.com/u/1337204?v=4"},"body":"On 2016/03/15 16:09 +0900, Eric Wong wrote:\n> Torsten Bögershausen <tboegi@web.de> wrote:\n>> On 03/15/2016 02:59 AM, Eric Wong wrote:\n>> >[]\n>> >I just edited locally and pushed those out to Junio:\n>> >\n>> >http://mid.gmane.org/20160315015726.GA25295@dcvr.yhbt.net\n>> >\n>> \n>> The new TC 11/12 don't pass under cygwin.\n>> \n>> Do we need cp932 ?\n> \n> Not sure, both CP932 and ISO8859-1 work fine for me on\n> GNU/Linux.   Anyways I'm fine skipping this patch for 2.8\n> while we hash it out, too.\n> \n> Kazutoshi: can you answer?  Thanks.\n\nI tried the patch. The test works (pass with my fixes, and fails\nwithout fixes) with ISO8859-1 for me on Cygnus. The change sounds\ngood.\n\n\n>> If not, we may use the paych from here:\n>> https://github.com/tboegi/git/commit/379c01bf52464f8a50065b11af516127e9144045\n>> \n>> Date:   Tue Mar 15 05:03:18 2016 +0100\n>> \n>>     t9115: Use funcky file names that work under unicode FS\n\n\"funcky\" looks a typo.\n\n>>     Don't use funky file names, that can not be created under\n>>     HFS or NTFS.\n\nThe file can be created on my Cygnus environment, which is under FONTS.\nSo it looks a bit inaccurate.\n\nI think a quote from the actual error message may be useful. It will\nlikely tell what was wrong, accurately. And also, someone may search for\nthat message.\n\n>> -       neq=$(printf \"\\201\\202\") &&\n>> -       git config svn.pathnameencoding cp932 &&\n>> +       neq=$(printf \"\\303\\244\") &&\n>> +       git config svn.pathnameencoding ISO8859-1 &&\n\nThe variable name \"new\" was for \"NOT EQUAL TO\" (0x8182 in cp932 = U+2260).\nhttp://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT\nThen it should be changed, too. A more abstract one may be appropriate.\n\n>> -       inf=$(printf \"\\201\\207\") &&\n>> -       git config svn.pathnameencoding cp932 &&\n>> +       inf=$(printf \"\\303\\226\") &&\n>> +       git config svn.pathnameencoding ISO8859-1 &&\n\nDitto. (0x8187 in cp932 = U+221E, INFINITY)\n\n-- \nk_satoda\n"},{"id":"280999","messageId":"56EA3DBD.2070105@web.de","threadId":"41372","inReplyTo":"56E999C3.4040802@f2.dion.ne.jp","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-03-17T05:16:45Z","receivedAt":"2016-03-17T05:16:45Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2016-03-16 18.37, Kazutoshi Satoda wrote:\n> \"funcky\" looks a typo.\n> \n>>>     Don't use funky file names, that can not be created under\n>>>     HFS or NTFS.\n> \n> The file can be created on my Cygnus environment, which is under FONTS.\n> So it looks a bit inaccurate.\n> \n> I think a quote from the actual error message may be useful. It will\n> likely tell what was wrong, accurately. And also, someone may search for\n> that message.\n> \n>>> -       neq=$(printf \"\\201\\202\") &&\n>>> -       git config svn.pathnameencoding cp932 &&\n>>> +       neq=$(printf \"\\303\\244\") &&\n>>> +       git config svn.pathnameencoding ISO8859-1 &&\n> \n> The variable name \"new\" was for \"NOT EQUAL TO\" (0x8182 in cp932 = U+2260).\n> http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT\n> Then it should be changed, too. A more abstract one may be appropriate.\n> \n>>> -       inf=$(printf \"\\201\\207\") &&\n>>> -       git config svn.pathnameencoding cp932 &&\n>>> +       inf=$(printf \"\\303\\226\") &&\n>>> +       git config svn.pathnameencoding ISO8859-1 &&\n> \n> Ditto. (0x8187 in cp932 = U+221E, INFINITY)\n> \n\nAgreed with all your comments, thanks for that.\nA better version is here:\n<https://github.com/tboegi/git/commit/7ea2fa1ffaeb1c05669a837d7fed9c60b8a0d3cb>\n\n\ncommit 7ea2fa1ffaeb1c05669a837d7fed9c60b8a0d3cb\nAuthor: Torsten Bögershausen <tboegi@web.de>\nDate:   Thu Mar 17 06:08:14 2016 +0100\n\n    t9115: Use prereq for funky file name\n\n    Some file systems like HFS don't allow file names outside unicode.\n    Add a precondition FS_CP932 and use it in t9115#11 and #12\n\ndiff --git a/t/t9115-git-svn-dcommit-funky-renames.sh\nb/t/t9115-git-svn-dcommit-funky-renames.sh\nindex 0990f8d..5a6525c 100755\n--- a/t/t9115-git-svn-dcommit-funky-renames.sh\n+++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n@@ -93,7 +93,7 @@ test_expect_success 'git svn rebase works inside a\nfresh-cloned repository' '\n # > to special UNICODE characters in the range 0xf000 to 0xf0ff (the\n # > \"Private use area\") when creating or accessing files.\n prepare_a_utf8_locale\n-test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '\n+test_expect_success UTF8,FS_CP932 'svn.pathnameencoding=cp932 new file on\ndcommit' '\n \tLC_ALL=$a_utf8_locale &&\n \texport LC_ALL &&\n \tneq=$(printf \"\\201\\202\") &&\n@@ -105,7 +105,7 @@ test_expect_success UTF8 'svn.pathnameencoding=cp932 new\nfile on dcommit' '\n '\n\n # See the comment on the above test for setting of LC_ALL.\n-test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '\n+test_expect_success UTF8,FS_CP932 'svn.pathnameencoding=cp932 rename on dcommit' '\n \tLC_ALL=$a_utf8_locale &&\n \texport LC_ALL &&\n \tinf=$(printf \"\\201\\207\") &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 0b47eb6..7bb1262 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1037,6 +1037,18 @@ test_lazy_prereq UTF8_NFD_TO_NFC '\n \tesac\n '\n\n+test_lazy_prereq FS_CP932 '\n+\t# check whether FS allows filenames from cp932\n+\tneq=$(printf \"\\201\\202\")\n+\t>\"$neq\" &&\n+\tcase \"$(echo *)\" in\n+\t\"neq\")\n+\t\ttrue ;;\n+\t*)\n+\t\tfalse ;;\n+\tesac\n+'\n+\n test_lazy_prereq AUTOIDENT '\n \tsane_unset GIT_AUTHOR_NAME &&\n \tsane_unset GIT_AUTHOR_EMAIL &&\n"},{"id":"281001","messageId":"56EA4230.7010501@web.de","threadId":"41372","inReplyTo":"56EA3DBD.2070105@web.de","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-03-17T05:35:44Z","receivedAt":"2016-03-17T05:35:44Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2016-03-17 06.16, Torsten Bögershausen wrote:\n\nOh Boy,\ntypo in the last patch and t9115#11,12 where skipped on Mac & Linux :-(\n\nThe \"case\" should look like this:\n\n> +\t\"$neq\")\n> +\t\ttrue ;;\n> +\t*)\n> +\t\tfalse ;;\n> +\tesac\n\nAnd the pathch is here:\n<https://github.com/tboegi/git/commit/866dfc192a0d4428aebfc7242f5134899b6dafd4>\n\nKazutoshi, could you re-test on your environment ?\n"},{"id":"281104","messageId":"56EB648A.2050802@f2.dion.ne.jp","threadId":"41372","inReplyTo":"56EA3DBD.2070105@web.de","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Kazutoshi Satoda","fromEmail":"k_satoda@f2.dion.ne.jp","sentAt":"2016-03-18T02:14:34Z","receivedAt":"2016-03-18T02:14:34Z","isPatch":true,"sender":{"key":"k_satoda@f2.dion.ne.jp","avatar":"https://avatars.githubusercontent.com/u/1337204?v=4"},"body":"On 2016/03/17 14:16 +0900, Torsten Bögershausen wrote:\n> On 2016-03-16 18.37, Kazutoshi Satoda wrote:\n>> \"funcky\" looks a typo.\n>> \n>>>>     Don't use funky file names, that can not be created under\n>>>>     HFS or NTFS.\n>> \n>> The file can be created on my Cygnus environment, which is under FONTS.\n>> So it looks a bit inaccurate.\n\nUh, ... I noticed that I wrongly instruct the spell checker...\n\nThe above was meant to be:\n\n  The file can be created on my Cygwin environment, which is under NTFS.\n  So it looks a bit inaccurate.\n\n>>>> -       neq=$(printf \"\\201\\202\") &&\n>>>> -       git config svn.pathnameencoding cp932 &&\n>>>> +       neq=$(printf \"\\303\\244\") &&\n>>>> +       git config svn.pathnameencoding ISO8859-1 &&\n>> \n>> The variable name \"new\" was for \"NOT EQUAL TO\" (0x8182 in cp932 = U+2260).\n>> http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT\n\nHere \"new\" was meant to be \"neq\", of course.\n\n\nSorry for the confusion.\n\n-- \nk_satoda\n"},{"id":"281103","messageId":"56EB64C2.4090405@f2.dion.ne.jp","threadId":"41372","inReplyTo":"56EA4230.7010501@web.de","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Kazutoshi Satoda","fromEmail":"k_satoda@f2.dion.ne.jp","sentAt":"2016-03-18T02:15:30Z","receivedAt":"2016-03-18T02:15:30Z","isPatch":true,"sender":{"key":"k_satoda@f2.dion.ne.jp","avatar":"https://avatars.githubusercontent.com/u/1337204?v=4"},"body":"On 2016/03/17 14:35 +0900, Torsten Bögershausen wrote:\n> On 2016-03-17 06.16, Torsten Bögershausen wrote:\n...\n> And the pathch is here:\n> <https://github.com/tboegi/git/commit/866dfc192a0d4428aebfc7242f5134899b6dafd4>\n> \n> Kazutoshi, could you re-test on your environment ?\n\nThe test 11,12 was skipped on my environment, too:\n> $ ./t9115-git-svn-dcommit-funky-renames.sh\n> ok 1 - load repository with strange names\n> ...\n> ok 10 - git svn rebase works inside a fresh-cloned repository\n> ok 11 # skip svn.pathnameencoding=cp932 new file on dcommit (missing FS_CP932 of UTF8,FS_CP932)\n> ok 12 # skip svn.pathnameencoding=cp932 rename on dcommit (missing FS_CP932 of UTF8,FS_CP932)\n> # passed all 12 test(s)\n> 1..12\n\nThat's because the check for FS_CP932 runs under LC_ALL=C environment\nwhich affects how filenames are treated. See the comment on #11 for more\ndetails.\n\nSetting LC_ALL before the check works for me.\n\n test_lazy_prereq FS_CP932 '\n        # check whether FS allows filenames from cp932\n+       prepare_a_utf8_locale\n+       LC_ALL=$a_utf8_locale &&\n+       export LC_ALL &&\n        neq=$(printf \"\\201\\202\")\n\nBut it looks a bit strange to do \"prepare_a_utf8_locale\" here because it\nis done just before #11 now, though I think it does no harm.\n\nI also don't understand the way of the check: Why don't you just touch\nand test it, like this:\n\ttouch \"$neq\" && test -e \"$neq\"\n?\n\n-- \nk_satoda\n"},{"id":"281212","messageId":"56ECF8C9.7090604@web.de","threadId":"41372","inReplyTo":"56EB64C2.4090405@f2.dion.ne.jp","subject":"Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-03-19T06:59:21Z","receivedAt":"2016-03-19T06:59:21Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2016-03-18 03.15, Kazutoshi Satoda wrote:\n> On 2016/03/17 14:35 +0900, Torsten Bögershausen wrote:\n>> On 2016-03-17 06.16, Torsten Bögershausen wrote:\n> ...\n>> And the pathch is here:\n>> <https://github.com/tboegi/git/commit/866dfc192a0d4428aebfc7242f5134899b6dafd4>\n>>\n>> Kazutoshi, could you re-test on your environment ?\n> \n> The test 11,12 was skipped on my environment, too:\n>> $ ./t9115-git-svn-dcommit-funky-renames.sh\n>> ok 1 - load repository with strange names\n>> ...\n>> ok 10 - git svn rebase works inside a fresh-cloned repository\n>> ok 11 # skip svn.pathnameencoding=cp932 new file on dcommit (missing FS_CP932 of UTF8,FS_CP932)\n>> ok 12 # skip svn.pathnameencoding=cp932 rename on dcommit (missing FS_CP932 of UTF8,FS_CP932)\n>> # passed all 12 test(s)\n>> 1..12\n> \n> That's because the check for FS_CP932 runs under LC_ALL=C environment\n> which affects how filenames are treated. See the comment on #11 for more\n> details.\n> \n> Setting LC_ALL before the check works for me.\n> \n>  test_lazy_prereq FS_CP932 '\n>         # check whether FS allows filenames from cp932\n> +       prepare_a_utf8_locale\n> +       LC_ALL=$a_utf8_locale &&\n> +       export LC_ALL &&\n>         neq=$(printf \"\\201\\202\")\n> \n> But it looks a bit strange to do \"prepare_a_utf8_locale\" here because it\n> is done just before #11 now, though I think it does no harm.\n> \n> I also don't understand the way of the check: Why don't you just touch\n> and test it, like this:\n> \ttouch \"$neq\" && test -e \"$neq\"\n> ?\n> \nThanks, I will re-send a new version in a couple of days or so.\n"}]}