]> git.madduck.net Git - code/myrepos.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix bug in escaping.
authorJoey Hess <joey@kitenet.net>
Sat, 22 Jan 2011 05:05:08 +0000 (01:05 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 22 Jan 2011 05:05:08 +0000 (01:05 -0400)
debian/changelog
mr

index eda8e6ffe61a56bfa15cf0901e57c8dc9e48f53a..d40a73f28a8104acc4e6abcc80e4a01e0b1436d8 100644 (file)
@@ -1,3 +1,9 @@
+mr (1.02) UNRELEASED; urgency=low
+
+  * Fix bug in escaping.
+
+ -- Joey Hess <joeyh@debian.org>  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.
 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 48c355c54a7690ef49b414136270cc05bd70858c..2c7c4da59b3dd6cf58a36115bc1512b931d9c5f6 100755 (executable)
--- a/mr
+++ b/mr
@@ -641,7 +641,7 @@ sub action {
 
                $command="set -e; ".$lib.
                        "my_action(){ $command\n }; my_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) {
                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 ".
        $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: $!";
 }
        print "mr register: running >>$command<<\n" if $verbose;
        exec($command) || die "exec: $!";
 }