From cbe6d498a888331bb94c052abc0d240a1f4b7811 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Jan 2011 01:05:08 -0400 Subject: [PATCH 1/1] Fix bug in escaping. --- debian/changelog | 6 ++++++ mr | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index eda8e6f..d40a73f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mr (1.02) UNRELEASED; urgency=low + + * Fix bug in escaping. + + -- Joey Hess Sat, 22 Jan 2011 01:04:01 -0400 + mr (1.01) unstable; urgency=low * Add "mr run", which can run an arbitrary command in each repository. diff --git a/mr b/mr index 48c355c..2c7c4da 100755 --- a/mr +++ b/mr @@ -641,7 +641,7 @@ sub action { $command="set -e; ".$lib. "my_action(){ $command\n }; my_action ". - join(" ", map { s/\//\/\//g; s/"/\"/g; '"'.$_.'"' } @ARGV); + join(" ", map { s/\\/\\\\/g; s/"/\"/g; '"'.$_.'"' } @ARGV); print "mr $action: running >>$command<<\n" if $verbose; my $ret=system($command); if ($ret != 0) { @@ -1417,7 +1417,7 @@ sub register { $ENV{MR_REPO}=~s/.*\/(.*)/$1/; $command="set -e; ".$config{$directory}{DEFAULT}{lib}."\n". "my_action(){ $command\n }; my_action ". - join(" ", map { s/\//\/\//g; s/"/\"/g; '"'.$_.'"' } @ARGV); + join(" ", map { s/\\/\\\\/g; s/"/\"/g; '"'.$_.'"' } @ARGV); print "mr register: running >>$command<<\n" if $verbose; exec($command) || die "exec: $!"; } -- 2.39.5