{"thread":{"id":"33435","subject":"[PATCH v2 0/7] remote-bzr: generic updates","startedAt":"2013-04-08T17:27:09Z","lastAt":"2013-04-08T19:39:30Z","messageCount":12,"participants":["Felipe Contreras","Junio C Hamano","Torsten Bögershausen"],"isPatch":true,"patchVersion":2,"patchTotal":7},"messages":[{"id":"213555","messageId":"1365442036-25732-1-git-send-email-felipe.contreras@gmail.com","threadId":"33435","inReplyTo":null,"subject":"[PATCH v2 0/7] remote-bzr: generic updates","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-08T17:27:09Z","receivedAt":"2013-04-08T17:27:09Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Hi,\n\nBasically the same couple of fixes, plus a fixed fix.\n\nChristophe Simonis (3):\n  remote-bzr: fix directory renaming\n  remote-bzr: remove files before modifications\n  remote-bzr: add utf-8 support for fetching\n\nDavid Engster (1):\n  remote-bzr: set author if available\n\nFelipe Contreras (3):\n  remote-bzr: only update workingtree on local repos\n  remote-bzr: improve tag handling\n  remote-bzr: add utf-8 support for pushing\n\n contrib/remote-helpers/git-remote-bzr |  64 +++++++++++++++------\n contrib/remote-helpers/test-bzr.sh    | 102 ++++++++++++++++++++++++++++++++++\n 2 files changed, 149 insertions(+), 17 deletions(-)\n\n-- \n1.8.2\n"},{"id":"213556","messageId":"1365442036-25732-2-git-send-email-felipe.contreras@gmail.com","threadId":"33435","inReplyTo":"1365442036-25732-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 1/7] remote-bzr: fix directory renaming","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-08T17:27:10Z","receivedAt":"2013-04-08T17:27:10Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"From: Christophe Simonis <christophe@kn.gl>\n\nGit does not handle directories, renaming a directory is renaming every\nfiles in this directory.\n\n[fc: added tests]\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/remote-helpers/git-remote-bzr |  8 +++++++-\n contrib/remote-helpers/test-bzr.sh    | 24 ++++++++++++++++++++++++\n 2 files changed, 31 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr\nindex c5822e4..a7d041b 100755\n--- a/contrib/remote-helpers/git-remote-bzr\n+++ b/contrib/remote-helpers/git-remote-bzr\n@@ -191,7 +191,13 @@ def get_filechanges(cur, prev):\n         modified[path] = fid\n     for oldpath, newpath, fid, kind, mod, _ in changes.renamed:\n         removed[oldpath] = None\n-        modified[newpath] = fid\n+        if kind == 'directory':\n+            lst = cur.list_files(from_dir=newpath, recursive=True)\n+            for path, file_class, kind, fid, entry in lst:\n+                if kind != 'directory':\n+                    modified[newpath + '/' + path] = fid\n+        else:\n+            modified[newpath] = fid\n \n     return modified, removed\n \ndiff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh\nindex 8450432..d26e5c7 100755\n--- a/contrib/remote-helpers/test-bzr.sh\n+++ b/contrib/remote-helpers/test-bzr.sh\n@@ -126,4 +126,28 @@ test_expect_success 'special modes' '\n   test_cmp expected actual\n '\n \n+cat > expected <<EOF\n+100644 blob 54f9d6da5c91d556e6b54340b1327573073030af\tcontent\n+100755 blob 68769579c3eaadbe555379b9c3538e6628bae1eb\texecutable\n+120000 blob 6b584e8ece562ebffc15d38808cd6b98fc3d97ea\tlink\n+040000 tree 35c0caa46693cef62247ac89a680f0c5ce32b37b\tmovedir-new\n+EOF\n+\n+test_expect_success 'moving directory' '\n+  (cd bzrrepo &&\n+  mkdir movedir &&\n+  echo one > movedir/one &&\n+  echo two > movedir/two &&\n+  bzr add movedir &&\n+  bzr commit -m movedir &&\n+  bzr mv movedir movedir-new &&\n+  bzr commit -m movedir-new) &&\n+\n+  (cd gitrepo &&\n+  git pull &&\n+  git ls-tree HEAD > ../actual) &&\n+\n+  test_cmp expected actual\n+'\n+\n test_done\n-- \n1.8.2\n"},{"id":"213557","messageId":"1365442036-25732-3-git-send-email-felipe.contreras@gmail.com","threadId":"33435","inReplyTo":"1365442036-25732-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 2/7] remote-bzr: remove files before modifications","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-08T17:27:11Z","receivedAt":"2013-04-08T17:27:11Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"From: Christophe Simonis <christophe@kn.gl>\n\nAllow re-add of a deleted file in the same commit.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/remote-helpers/git-remote-bzr | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr\nindex a7d041b..f818e93 100755\n--- a/contrib/remote-helpers/git-remote-bzr\n+++ b/contrib/remote-helpers/git-remote-bzr\n@@ -303,10 +303,10 @@ def export_branch(branch, name):\n             else:\n                 print \"merge :%s\" % m\n \n+        for f in removed:\n+            print \"D %s\" % (f,)\n         for f in modified_final:\n             print \"M %s :%u %s\" % f\n-        for f in removed:\n-            print \"D %s\" % (f)\n         print\n \n         count += 1\n-- \n1.8.2\n"},{"id":"213558","messageId":"1365442036-25732-4-git-send-email-felipe.contreras@gmail.com","threadId":"33435","inReplyTo":"1365442036-25732-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 3/7] remote-bzr: set author if available","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-08T17:27:12Z","receivedAt":"2013-04-08T17:27:12Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"From: David Engster <deng@randomsample.de>\n\n[fc: added tests]\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/remote-helpers/git-remote-bzr |  7 ++++++-\n contrib/remote-helpers/test-bzr.sh    | 15 +++++++++++++++\n 2 files changed, 21 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr\nindex f818e93..a99a924 100755\n--- a/contrib/remote-helpers/git-remote-bzr\n+++ b/contrib/remote-helpers/git-remote-bzr\n@@ -266,7 +266,12 @@ def export_branch(branch, name):\n         tz = rev.timezone\n         committer = rev.committer.encode('utf-8')\n         committer = \"%s %u %s\" % (fixup_user(committer), time, gittz(tz))\n-        author = committer\n+        authors = rev.get_apparent_authors()\n+        if authors:\n+            author = authors[0].encode('utf-8')\n+            author = \"%s %u %s\" % (fixup_user(author), time, gittz(tz))\n+        else:\n+            author = committer\n         msg = rev.message.encode('utf-8')\n \n         msg += '\\n'\ndiff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh\nindex d26e5c7..68105fc 100755\n--- a/contrib/remote-helpers/test-bzr.sh\n+++ b/contrib/remote-helpers/test-bzr.sh\n@@ -150,4 +150,19 @@ test_expect_success 'moving directory' '\n   test_cmp expected actual\n '\n \n+test_expect_success 'different authors' '\n+  (cd bzrrepo &&\n+  echo john >> content &&\n+  bzr commit -m john \\\n+    --author \"Jane Rey <jrey@example.com>\" \\\n+    --author \"John Doe <jdoe@example.com>\") &&\n+\n+  (cd gitrepo &&\n+  git pull &&\n+  git show --format=\"%an <%ae>, %cn <%ce>\" --quiet > ../actual) &&\n+\n+  echo \"Jane Rey <jrey@example.com>, A U Thor <author@example.com>\" > expected &&\n+  test_cmp expected actual\n+'\n+\n test_done\n-- \n1.8.2\n"},{"id":"213559","messageId":"1365442036-25732-5-git-send-email-felipe.contreras@gmail.com","threadId":"33435","inReplyTo":"1365442036-25732-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 4/7] remote-bzr: only update workingtree on local repos","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-08T17:27:13Z","receivedAt":"2013-04-08T17:27:13Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Apparently, that's the only way it's possible.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/remote-helpers/git-remote-bzr | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr\nindex a99a924..9466cb9 100755\n--- a/contrib/remote-helpers/git-remote-bzr\n+++ b/contrib/remote-helpers/git-remote-bzr\n@@ -630,10 +630,9 @@ def do_export(parser):\n                     peer.import_last_revision_info_and_tags(repo, revno, revid)\n                 else:\n                     peer.import_last_revision_info(repo.repository, revno, revid)\n-                wt = peer.bzrdir.open_workingtree()\n             else:\n                 wt = repo.bzrdir.open_workingtree()\n-            wt.update()\n+                wt.update()\n         print \"ok %s\" % ref\n     print\n \n-- \n1.8.2\n"},{"id":"213560","messageId":"1365442036-25732-6-git-send-email-felipe.contreras@gmail.com","threadId":"33435","inReplyTo":"1365442036-25732-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 5/7] remote-bzr: improve tag handling","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-08T17:27:14Z","receivedAt":"2013-04-08T17:27:14Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"If the tags don't have an associated revision, there's nothing we can do\nwith them, skip them. Also, let's skip the ones git can't handle.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/remote-helpers/git-remote-bzr | 25 ++++++++++++++++++-------\n 1 file changed, 18 insertions(+), 7 deletions(-)\n\ndiff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr\nindex 9466cb9..dc0b757 100755\n--- a/contrib/remote-helpers/git-remote-bzr\n+++ b/contrib/remote-helpers/git-remote-bzr\n@@ -25,6 +25,7 @@ bzrlib.plugin.load_plugins()\n \n import bzrlib.generate_ids\n import bzrlib.transport\n+import bzrlib.errors\n \n import sys\n import os\n@@ -332,12 +333,9 @@ def export_branch(branch, name):\n \n def export_tag(repo, name):\n     global tags\n-    try:\n-        print \"reset refs/tags/%s\" % name\n-        print \"from :%u\" % rev_to_mark(tags[name])\n-        print\n-    except KeyError:\n-        warn(\"TODO: fetch tag '%s'\" % name)\n+    print \"reset refs/tags/%s\" % name\n+    print \"from :%u\" % rev_to_mark(tags[name])\n+    print\n \n def do_import(parser):\n     global dirname\n@@ -651,12 +649,25 @@ def do_capabilities(parser):\n \n     print\n \n+def ref_is_valid(name):\n+    return not True in [c in name for c in '~^: \\\\']\n+\n def do_list(parser):\n     global tags\n     print \"? refs/heads/%s\" % 'master'\n-    for tag, revid in parser.repo.tags.get_tag_dict().items():\n+\n+    branch = parser.repo\n+    branch.lock_read()\n+    for tag, revid in branch.tags.get_tag_dict().items():\n+        try:\n+            branch.revision_id_to_dotted_revno(revid)\n+        except bzrlib.errors.NoSuchRevision:\n+            continue\n+        if not ref_is_valid(tag):\n+            continue\n         print \"? refs/tags/%s\" % tag\n         tags[tag] = revid\n+    branch.unlock()\n     print \"@refs/heads/%s HEAD\" % 'master'\n     print\n \n-- \n1.8.2\n"},{"id":"213562","messageId":"1365442036-25732-7-git-send-email-felipe.contreras@gmail.com","threadId":"33435","inReplyTo":"1365442036-25732-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 6/7] remote-bzr: add utf-8 support for fetching","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-08T17:27:15Z","receivedAt":"2013-04-08T17:27:15Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"From: Christophe Simonis <christophe@kn.gl>\n\nInitial patch by Timotheus Pokorra.\n\n[fc: added tests]\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/remote-helpers/git-remote-bzr | 15 +++++++++------\n contrib/remote-helpers/test-bzr.sh    | 32 ++++++++++++++++++++++++++++++++\n 2 files changed, 41 insertions(+), 6 deletions(-)\n\ndiff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr\nindex dc0b757..64b35c7 100755\n--- a/contrib/remote-helpers/git-remote-bzr\n+++ b/contrib/remote-helpers/git-remote-bzr\n@@ -184,21 +184,24 @@ def get_filechanges(cur, prev):\n \n     changes = cur.changes_from(prev)\n \n+    def u(s):\n+        return s.encode('utf-8')\n+\n     for path, fid, kind in changes.added:\n-        modified[path] = fid\n+        modified[u(path)] = fid\n     for path, fid, kind in changes.removed:\n-        removed[path] = None\n+        removed[u(path)] = None\n     for path, fid, kind, mod, _ in changes.modified:\n-        modified[path] = fid\n+        modified[u(path)] = fid\n     for oldpath, newpath, fid, kind, mod, _ in changes.renamed:\n-        removed[oldpath] = None\n+        removed[u(oldpath)] = None\n         if kind == 'directory':\n             lst = cur.list_files(from_dir=newpath, recursive=True)\n             for path, file_class, kind, fid, entry in lst:\n                 if kind != 'directory':\n-                    modified[newpath + '/' + path] = fid\n+                    modified[u(newpath + '/' + path)] = fid\n         else:\n-            modified[newpath] = fid\n+            modified[u(newpath)] = fid\n \n     return modified, removed\n \ndiff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh\nindex 68105fc..9a510a8 100755\n--- a/contrib/remote-helpers/test-bzr.sh\n+++ b/contrib/remote-helpers/test-bzr.sh\n@@ -165,4 +165,36 @@ test_expect_success 'different authors' '\n   test_cmp expected actual\n '\n \n+test_expect_success 'fetch utf-8 filenames' '\n+  mkdir -p tmp && cd tmp &&\n+  test_when_finished \"cd .. && rm -rf tmp && LC_ALL=C\" &&\n+\n+  export LC_ALL=en_US.UTF-8\n+\n+  (\n+  bzr init bzrrepo &&\n+  cd bzrrepo &&\n+\n+  echo test >> \"áéíóú\" &&\n+  bzr add \"áéíóú\" &&\n+  echo test >> \"îø∫∆\" &&\n+  bzr add \"îø∫∆\" &&\n+  bzr commit -m utf-8 &&\n+  echo test >> \"áéíóú\" &&\n+  bzr commit -m utf-8 &&\n+  bzr rm \"îø∫∆\" &&\n+  bzr mv \"áéíóú\" \"åß∂\" &&\n+  bzr commit -m utf-8\n+  ) &&\n+\n+  (\n+  git clone \"bzr::$PWD/bzrrepo\" gitrepo &&\n+  cd gitrepo &&\n+  git ls-files > ../actual\n+  ) &&\n+\n+  echo \"\\\"\\\\303\\\\245\\\\303\\\\237\\\\342\\\\210\\\\202\\\"\" > expected &&\n+  test_cmp expected actual\n+'\n+\n test_done\n-- \n1.8.2\n"},{"id":"213561","messageId":"1365442036-25732-8-git-send-email-felipe.contreras@gmail.com","threadId":"33435","inReplyTo":"1365442036-25732-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 7/7] remote-bzr: add utf-8 support for pushing","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-08T17:27:16Z","receivedAt":"2013-04-08T17:27:16Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/remote-helpers/git-remote-bzr |  6 ++++++\n contrib/remote-helpers/test-bzr.sh    | 31 +++++++++++++++++++++++++++++++\n 2 files changed, 37 insertions(+)\n\ndiff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr\nindex 64b35c7..bd25e08 100755\n--- a/contrib/remote-helpers/git-remote-bzr\n+++ b/contrib/remote-helpers/git-remote-bzr\n@@ -513,6 +513,11 @@ class CustomTree():\n     def get_symlink_target(self, file_id):\n         return self.updates[file_id]['data']\n \n+def c_style_unescape(string):\n+    if string[0] == string[-1] == '\"':\n+        return string.decode('string-escape')[1:-1]\n+    return string\n+\n def parse_commit(parser):\n     global marks, blob_marks, bmarks, parsed_refs\n     global mode\n@@ -552,6 +557,7 @@ def parse_commit(parser):\n             f = { 'deleted' : True }\n         else:\n             die('Unknown file command: %s' % line)\n+        path = c_style_unescape(path).decode('utf-8')\n         files[path] = f\n \n     repo = parser.repo\ndiff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh\nindex 9a510a8..e800c97 100755\n--- a/contrib/remote-helpers/test-bzr.sh\n+++ b/contrib/remote-helpers/test-bzr.sh\n@@ -197,4 +197,35 @@ test_expect_success 'fetch utf-8 filenames' '\n   test_cmp expected actual\n '\n \n+test_expect_success 'push utf-8 filenames' '\n+  mkdir -p tmp && cd tmp &&\n+  test_when_finished \"cd .. && rm -rf tmp && LC_ALL=C\" &&\n+\n+  export LC_ALL=en_US.UTF-8\n+\n+  (\n+  bzr init bzrrepo &&\n+  cd bzrrepo &&\n+\n+  echo one >> content &&\n+  bzr add content &&\n+  bzr commit -m one\n+  ) &&\n+\n+  (\n+  git clone \"bzr::$PWD/bzrrepo\" gitrepo &&\n+  cd gitrepo &&\n+\n+  echo test >> \"áéíóú\" &&\n+  git add \"áéíóú\" &&\n+  git commit -m utf-8 &&\n+\n+  git push\n+  ) &&\n+\n+  (cd bzrrepo && bzr ls > ../actual) &&\n+  echo -e \"content\\náéíóú\" > expected &&\n+  test_cmp expected actual\n+'\n+\n test_done\n-- \n1.8.2\n"},{"id":"213574","messageId":"7v1uakyj30.fsf@alter.siamese.dyndns.org","threadId":"33435","inReplyTo":"1365442036-25732-1-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH v2 0/7] remote-bzr: generic updates","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-08T18:26:43Z","receivedAt":"2013-04-08T18:26:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Oops.  The previous round is already now part of 'master'.\n"},{"id":"213580","messageId":"CAMP44s1WXpNaPXd+fGm4_oFQEFf_Sjq1PsHUn2XjtfMebY2PHQ@mail.gmail.com","threadId":"33435","inReplyTo":"7v1uakyj30.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2 0/7] remote-bzr: generic updates","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-08T18:38:07Z","receivedAt":"2013-04-08T18:38:07Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Mon, Apr 8, 2013 at 1:26 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Oops.  The previous round is already now part of 'master'.\n\nAll right, rebased and resent.\n\n--\nFelipe Contreras\n"},{"id":"213585","messageId":"7vsj30x2yc.fsf@alter.siamese.dyndns.org","threadId":"33435","inReplyTo":"CAMP44s1WXpNaPXd+fGm4_oFQEFf_Sjq1PsHUn2XjtfMebY2PHQ@mail.gmail.com","subject":"Re: [PATCH v2 0/7] remote-bzr: generic updates","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-08T19:00:27Z","receivedAt":"2013-04-08T19:00:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> On Mon, Apr 8, 2013 at 1:26 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Oops.  The previous round is already now part of 'master'.\n>\n> All right, rebased and resent.\n\nThanks.\n"},{"id":"213593","messageId":"51631CF2.5090503@web.de","threadId":"33435","inReplyTo":"1365442036-25732-7-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH v2 6/7] remote-bzr: add utf-8 support for fetching","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2013-04-08T19:39:30Z","receivedAt":"2013-04-08T19:39:30Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 08.04.13 19:27, Felipe Contreras wrote:\n> From: Christophe Simonis <christophe@kn.gl>\n> \n> Initial patch by Timotheus Pokorra.\n> \n> [fc: added tests]\n> \n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n>  contrib/remote-helpers/git-remote-bzr | 15 +++++++++------\n>  contrib/remote-helpers/test-bzr.sh    | 32 ++++++++++++++++++++++++++++++++\n>  2 files changed, 41 insertions(+), 6 deletions(-)\n> \n> +\n> +  export LC_ALL=en_US.UTF-8\n> +\n> +  (\n> +  bzr init bzrrepo &&\n> +  cd bzrrepo &&\n> +\n> +  echo test >> \"áéíóú\" &&\n> +  bzr add \"áéíóú\" &&\n\nJust a whish from my side:\nbzr under MacOS is not able to handle some unicode characters correctly.\n(Those we can decompose)\nhttps://bugs.launchpad.net/bzr/+bug/172383\n\nI just added a fix on the test-bzr script we have on git.git/next,\nand the short version is to avoid all code points like áéíóú.\nThe greek stuff is probably OK, but the accents are not.\nI choose a danish/norwegian \"æ\", which is not decomposable.\n(And the non-portable echo -e could be avoided by using printf)\n/Torsten\n \n\ngit diff git.git/next\ndiff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh\nindex f4c7768..2150e7c 100755\n--- a/contrib/remote-helpers/test-bzr.sh\n+++ b/contrib/remote-helpers/test-bzr.sh\n@@ -175,8 +175,8 @@ test_expect_success 'fetch utf-8 filenames' '\n   bzr init bzrrepo &&\n   cd bzrrepo &&\n \n-  echo test >> \"áéíóú\" &&\n-  bzr add \"áéíóú\" &&\n+  echo test >> \"æ\" &&\n+  bzr add \"æ\" &&\n   bzr commit -m utf-8\n   ) &&\n \n@@ -185,8 +185,7 @@ test_expect_success 'fetch utf-8 filenames' '\n   cd gitrepo &&\n   git ls-files > ../actual\n   ) &&\n-  echo \"\\\"\\\\303\\\\241\\\\303\\\\251\\\\303\\\\255\\\\303\\\\263\\\\303\\\\272\\\"\" > expected &&\n+  echo \"\\\"\\\\303\\\\246\\\"\" > expected &&\n   test_cmp expected actual\n '\n \n@@ -209,15 +208,15 @@ test_expect_success 'push utf-8 filenames' '\n   git clone \"bzr::$PWD/bzrrepo\" gitrepo &&\n   cd gitrepo &&\n \n-  echo test >> \"áéíóú\" &&\n-  git add \"áéíóú\" &&\n+  echo test >> \"æ\" &&\n+  git add \"æ\" &&\n   git commit -m utf-8 &&\n \n   git push\n   ) &&\n \n   (cd bzrrepo && bzr ls > ../actual) &&\n-  echo -e \"content\\náéíóú\" > expected &&\n+  printf \"content\\n\\303\\246\\n\" > expected &&\n   test_cmp expected actual\n '\n \n"}]}