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

[PATCH] archimport: handle pika escaping

From
MLMartin Langhoff <martin@catalyst.net.nz>
Date
Nov 11, 2005, 05:00 UTC
Message-ID
<11316852571842-git-send-email-martin@catalyst.net.nz>

Arch uses pika escaping in some places (but not all!). Specifically, commits of the type 'patch' use pika escaping in the log entries, which we parse to know what to add/delete and what to commit.

This patch checks for hints of pika escaping and asks tla to unescape for us.
Originally implemented by Penny Leach <penny@catalyst.net.nz>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
---
 git-archimport.perl |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

applies-to: 6466c53ae80cddbb581c5fdb2332f9321fade867 b9d1055507ebce7f1ae1706feb79619cb03cf078

diff --git a/git-archimport.perl b/git-archimport.perl
index 980e827..e22c816 100755
--- a/git-archimport.perl
+++ b/git-archimport.perl
@@ -565,6 +565,11 @@ sub parselog {
             next if $t =~ m!\{arch\}/!;
             next if $t =~ m!\.arch-ids/!;
             next if $t =~ m!\.arch-inventory$!;
+           # tla cat-archive-log will give us filenames with spaces as file\(sp)name - why?
+           # we can assume that any filename with \ indicates some pika escaping that we want to get rid of.
+           if  ($t =~ /\\/ ){
+               $t = `tla escape --unescaped '$t'`;
+           }
             push (@tmp, shell_quote($t));
         }
         @$ref = @tmp;
---
0.99.8.GIT
Message 1 of 1 in “archimport: handle pika escaping”
  1. archimport: handle pika escapingMartin Langhoff, Nov 11, 2005

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.