summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Langhoff <martin@catalyst.net.nz>2005-11-11 05:00:57 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-11 09:15:26 (GMT)
commitf84f9d38ebd809ecab89d2d4926c3ff6bc3c60f5 (patch)
treed01698963c91c32679e4a9a52a4ac94a5feee296
parent0e9ab02da77fcf59fdb7d8201d3c5546cd346e63 (diff)
downloadgit-f84f9d38ebd809ecab89d2d4926c3ff6bc3c60f5.zip
git-f84f9d38ebd809ecab89d2d4926c3ff6bc3c60f5.tar.gz
git-f84f9d38ebd809ecab89d2d4926c3ff6bc3c60f5.tar.bz2
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>
-rwxr-xr-xgit-archimport.perl5
1 files changed, 5 insertions, 0 deletions
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;