Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c3740c90e450910f3921eab862f174dcd73b1363

>---------------------------------------------------------------

commit c3740c90e450910f3921eab862f174dcd73b1363
Author: Simon Marlow <[email protected]>
Date:   Tue Apr 5 11:08:35 2011 +0100

    'fetch' and 'new' can take branch names as arguments (defaulting to 
'origin')
    
    e.g.
    
       ./sync-all -r ~/git/ghc-working remote add working
       ./sync-all fetch working

>---------------------------------------------------------------

 sync-all |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/sync-all b/sync-all
index e4cb40e..2f47974 100755
--- a/sync-all
+++ b/sync-all
@@ -238,6 +238,12 @@ sub scmall {
         if ($subcommand ne 'add' && $subcommand ne 'rm') {
             help();
         }
+    } elsif ($command eq 'new' || $command eq 'fetch') {
+        if (@_ < 1) {
+            $branch_name = 'origin';
+        } else {
+            $branch_name = shift;
+        }
     }
 
     for $line (@packages) {
@@ -316,10 +322,10 @@ sub scmall {
                 @scm_args = ("remote", "set-url", "--push", "origin", $path);
             }
             elsif ($command =~ /^fetch$/) {
-                @scm_args = ("fetch", "origin");
+                @scm_args = ("fetch", "$branch_name");
             }
             elsif ($command =~ /^new$/) {
-                @scm_args = ("log", "origin..");
+                @scm_args = ("log", "$branch_name..");
             }
             elsif ($command =~ /^remote$/) {
                 if ($subcommand eq 'add') {



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to