Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/4bac993e3d00edc0ceac99f4b44ade477ae9aa90 >--------------------------------------------------------------- commit 4bac993e3d00edc0ceac99f4b44ade477ae9aa90 Author: Johan Tibell <[email protected]> Date: Thu Feb 16 19:09:55 2012 -0800 Add sync-all new-workdir This command calls git-new-workdir (a separate script in git's contrib directory) on all repos. Useful to create multiple build trees, without cloning the repos. Usage: sync-all new-workdir <new_workdir> [<branch>] >--------------------------------------------------------------- sync-all | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/sync-all b/sync-all index 0039219..87186de 100755 --- a/sync-all +++ b/sync-all @@ -129,6 +129,29 @@ sub warning { } } +sub gitNewWorkdir { + my $dir = shift; + my $target = shift; + my $target_dir = "$target/$dir"; + my $pwd; + + if ($dir eq '.') { + message "== running git-new-workdir . $target_dir @_"; + } else { + message "== $dir: running git-new-workdir . $target_dir @_"; + $pwd = getcwd(); + chdir($dir); + } + + system ("git-new-workdir", ".", $target_dir, @_) == 0 + or $ignore_failure + or die "git-new-workdir failed: $?"; + + if ($dir ne '.') { + chdir($pwd); + } +} + sub scm { my $dir = shift; my $scm = shift; @@ -343,6 +366,9 @@ sub scmall { elsif ($command =~ /^(?:pul|pull)$/) { scm ($localpath, $scm, "pull", @args); } + elsif ($command =~ /^(?:new-workdir)$/) { + gitNewWorkdir ($localpath, @args); + } elsif ($command =~ /^(?:s|se|sen|send)$/) { if ($scm eq "darcs") { $command = "send"; @@ -511,6 +537,7 @@ any extra arguments to git: grep log new + new-workdir pull push repack _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
