git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 6/7] remote-bzr: add utf-8 support for fetching

From
Torsten Bögershausen <tboegi@web.de>
Date
Apr 8, 2013, 19:39 UTC
Message-ID
<51631CF2.5090503@web.de>
In-Reply-To
<1365442036-25732-7-git-send-email-felipe.contreras@gmail.com>
On 08.04.13 19:27, Felipe Contreras wrote:
Show 21 quoted lines
> From: Christophe Simonis <christophe@kn.gl>
> 
> Initial patch by Timotheus Pokorra.
> 
> [fc: added tests]
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  contrib/remote-helpers/git-remote-bzr | 15 +++++++++------
>  contrib/remote-helpers/test-bzr.sh    | 32 ++++++++++++++++++++++++++++++++
>  2 files changed, 41 insertions(+), 6 deletions(-)
> 
> +
> +  export LC_ALL=en_US.UTF-8
> +
> +  (
> +  bzr init bzrrepo &&
> +  cd bzrrepo &&
> +
> +  echo test >> "áéíóú" &&
> +  bzr add "áéíóú" &&

Just a whish from my side: bzr under MacOS is not able to handle some unicode characters correctly. (Those we can decompose) https://bugs.launchpad.net/bzr/+bug/172383

I just added a fix on the test-bzr script we have on git.git/next,
and the short version is to avoid all code points like áéíóú.
The greek stuff is probably OK, but the accents are not.
I choose a danish/norwegian "æ", which is not decomposable.
(And the non-portable echo -e could be avoided by using printf)
/Torsten
 
git diff git.git/next
diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh
index f4c7768..2150e7c 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -175,8 +175,8 @@ test_expect_success 'fetch utf-8 filenames' '
   bzr init bzrrepo &&
   cd bzrrepo &&
 
-  echo test >> "áéíóú" &&
-  bzr add "áéíóú" &&
+  echo test >> "æ" &&
+  bzr add "æ" &&
   bzr commit -m utf-8
   ) &&
 
@@ -185,8 +185,7 @@ test_expect_success 'fetch utf-8 filenames' '
   cd gitrepo &&
   git ls-files > ../actual
   ) &&
-  echo "\"\\303\\241\\303\\251\\303\\255\\303\\263\\303\\272\"" > expected &&
+  echo "\"\\303\\246\"" > expected &&
   test_cmp expected actual
 '
 
@@ -209,15 +208,15 @@ test_expect_success 'push utf-8 filenames' '
   git clone "bzr::$PWD/bzrrepo" gitrepo &&
   cd gitrepo &&
 
-  echo test >> "áéíóú" &&
-  git add "áéíóú" &&
+  echo test >> "æ" &&
+  git add "æ" &&
   git commit -m utf-8 &&
 
   git push
   ) &&
 
   (cd bzrrepo && bzr ls > ../actual) &&
-  echo -e "content\náéíóú" > expected &&
+  printf "content\n\303\246\n" > expected &&
   test_cmp expected actual
 '
 
Previous: Felipe ContrerasNext: Felipe Contreras
Message 8 of 12 in “remote-bzr: generic updates”
  1. 0/7 remote-bzr: generic updatesFelipe Contreras, Apr 8, 2013
  2. 1/7 remote-bzr: fix directory renamingFelipe Contreras, Apr 8, 2013
  3. 2/7 remote-bzr: remove files before modificationsFelipe Contreras, Apr 8, 2013
  4. 3/7 remote-bzr: set author if availableFelipe Contreras, Apr 8, 2013
  5. 4/7 remote-bzr: only update workingtree on local reposFelipe Contreras, Apr 8, 2013
  6. 5/7 remote-bzr: improve tag handlingFelipe Contreras, Apr 8, 2013
  7. 6/7 remote-bzr: add utf-8 support for fetchingFelipe Contreras, Apr 8, 2013
  8. Torsten BögershausenApr 8, 2013
  9. 7/7 remote-bzr: add utf-8 support for pushingFelipe Contreras, Apr 8, 2013
  10. Junio C HamanoApr 8, 2013
  11. Felipe ContrerasApr 8, 2013
  12. Junio C HamanoApr 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.