Skip to content

Commit

Permalink
make "./sync-all -r <path> remote set-url origin" work
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmar committed Jan 7, 2013
1 parent 4da767e commit 7d1216a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sync-all
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7d1216a

Please sign in to comment.