Skip to content

Commit

Permalink
Make "./darcs-all optimize --relink" do the right thing
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmar committed Nov 11, 2009
1 parent a35d65c commit ebaa8c9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions darcs-all
Expand Up @@ -125,6 +125,7 @@ sub darcsall {
my $path;
my $tag;
my @repos;
my $command = $_[0];

my ($repo_base, $checked_out_tree) = getrepo();

Expand All @@ -148,7 +149,12 @@ sub darcsall {

if (-d "$localpath/_darcs") {
if ($want_remote_repo) {
darcs (@_, "--repodir", $localpath, $path);
if ($command =~ /^opt/) {
# Allows ./darcs-all optimize --relink
darcs (@_, "--repodir", $localpath, "--sibling=$path");
} else {
darcs (@_, "--repodir", $localpath, $path);
}
} else {
darcs (@_, "--repodir", $localpath);
}
Expand Down Expand Up @@ -272,7 +278,7 @@ sub main {
# Hack around whatsnew failing if there are no changes
$ignore_failure = 1;
}
if ($command =~ /^(pul|pus|sen|put)/) {
if ($command =~ /^(pul|pus|sen|put|opt)/) {
$want_remote_repo = 1;
}
darcsall @_;
Expand Down

0 comments on commit ebaa8c9

Please sign in to comment.