{"thread":{"id":"2445","subject":"[PATCH] archimport: handle pika escaping","startedAt":"2005-11-11T05:00:57Z","lastAt":"2005-11-11T05:00:57Z","messageCount":1,"participants":["Martin Langhoff"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"11547","messageId":"11316852571842-git-send-email-martin@catalyst.net.nz","threadId":"2445","inReplyTo":null,"subject":"[PATCH] archimport: handle pika escaping","fromName":"Martin Langhoff","fromEmail":"martin@catalyst.net.nz","sentAt":"2005-11-11T05:00:57Z","receivedAt":"2005-11-11T05:00:57Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"Arch uses pika escaping in some places (but not all!). Specifically, commits of\nthe type 'patch' use pika escaping in the log entries, which we parse to know\nwhat to add/delete and what to commit.\n\nThis patch checks for hints of pika escaping and asks tla to unescape for us.\n\nOriginally implemented by Penny Leach <penny@catalyst.net.nz>\n\nSigned-off-by: Martin Langhoff <martin@catalyst.net.nz>\n\n\n---\n\n git-archimport.perl |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\napplies-to: 6466c53ae80cddbb581c5fdb2332f9321fade867\nb9d1055507ebce7f1ae1706feb79619cb03cf078\ndiff --git a/git-archimport.perl b/git-archimport.perl\nindex 980e827..e22c816 100755\n--- a/git-archimport.perl\n+++ b/git-archimport.perl\n@@ -565,6 +565,11 @@ sub parselog {\n             next if $t =~ m!\\{arch\\}/!;\n             next if $t =~ m!\\.arch-ids/!;\n             next if $t =~ m!\\.arch-inventory$!;\n+           # tla cat-archive-log will give us filenames with spaces as file\\(sp)name - why?\n+           # we can assume that any filename with \\ indicates some pika escaping that we want to get rid of.\n+           if  ($t =~ /\\\\/ ){\n+               $t = `tla escape --unescaped '$t'`;\n+           }\n             push (@tmp, shell_quote($t));\n         }\n         @$ref = @tmp;\n---\n0.99.8.GIT\n"}]}