Skip to content
Browse files

make "./sync-all -r <path> remote set-url origin" work

  • Loading branch information...
1 parent 4da767e commit 7d1216ab9b7e80a860de0498854883761d6e7d33 @simonmar simonmar committed Dec 21, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 sync-all
View
10 sync-all
@@ -417,15 +417,21 @@ sub scmall {
}
elsif ($command eq "remote") {
my @scm_args;
+ my $rpath;
$ignore_failure = 1;
+ if ($remotepath eq '-') {
+ $rpath = "$repo_base/$localpath";
+ } else {
+ $rpath = $path;
+ }
if ($subcommand eq 'add') {
- @scm_args = ("remote", "add", $branch_name, $path);
+ @scm_args = ("remote", "add", $branch_name, $rpath);
} elsif ($subcommand eq 'rm') {
@scm_args = ("remote", "rm", $branch_name);
} elsif ($subcommand eq 'set-branches') {
@scm_args = ("remote", "set-branches", $branch_name);
} elsif ($subcommand eq 'set-url') {
- @scm_args = ("remote", "set-url", $branch_name, $path);
+ @scm_args = ("remote", "set-url", $branch_name, $rpath);
}
scm ($localpath, $scm, @scm_args, @args);
}

0 comments on commit 7d1216a

Please sign in to comment.
Something went wrong with that request. Please try again.