@matheusbsbs / matheus-bagliano / commits / f84f9d38eb
Fork 0

archimport: handle pika escaping

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> Signed-off-by: Junio C Hamano <junkio@cox.net>

Martin Langhoff committed Nov 11, 2005 at 18:00 UTC f84f9d38ebd809ecab89d2d4926c3ff6bc3c60f5
1 file changed +5
git-archimport.perl
+5
@@ -565,6 +565,11 @@ sub parselog {
565 next if $t =~ m!\{arch\}/!;
566 next if $t =~ m!\.arch-ids/!;
567 next if $t =~ m!\.arch-inventory$!;
568 + # tla cat-archive-log will give us filenames with spaces as file\(sp)name - why?
569 + # we can assume that any filename with \ indicates some pika escaping that we want to get rid of.
570 + if ($t =~ /\\/ ){
571 + $t = `tla escape --unescaped '$t'`;
572 + }
573 push (@tmp, shell_quote($t));
574 }
575 @$ref = @tmp;