You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/04/24 19:52:11 UTC

[1/2] git commit: Make repo-update use "git remote update" instead of "git fetch" (faster)

Repository: cordova-coho
Updated Branches:
  refs/heads/master 3da926b21 -> 608e06d93


Make repo-update use "git remote update" instead of "git fetch" (faster)


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/dcf5585d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/dcf5585d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/dcf5585d

Branch: refs/heads/master
Commit: dcf5585dbcaa243c672d7a2c088e13d22e53a8ea
Parents: 3da926b
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Apr 24 13:51:35 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Apr 24 13:51:35 2014 -0400

----------------------------------------------------------------------
 src/repo-update.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/dcf5585d/src/repo-update.js
----------------------------------------------------------------------
diff --git a/src/repo-update.js b/src/repo-update.js
index d887e4f..7e74dd9 100644
--- a/src/repo-update.js
+++ b/src/repo-update.js
@@ -85,9 +85,8 @@ function *updateRepos(repos, branches, noFetch) {
             if (repo.svn) {
                 return;
             }
-            // TODO - can these be combined? Fetching with --tags seems to not pull in changes...
-            yield executil.execHelper(executil.ARGS('git fetch --progress ' + repo.remoteName));
-            yield executil.execHelper(executil.ARGS('git fetch --progress --tags ' + repo.remoteName));
+            // Note: this does the same as git fetch --tags origin && git fetch origin
+            yield executil.execHelper(executil.ARGS('git remote update ', repo.remoteName));
         });
     }
 


[2/2] git commit: Organize list of commands in --help into groups

Posted by ag...@apache.org.
Organize list of commands in --help into groups


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/608e06d9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/608e06d9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/608e06d9

Branch: refs/heads/master
Commit: 608e06d935b423dbf051051417fe893b91999991
Parents: dcf5585
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Apr 24 13:51:54 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Apr 24 13:51:54 2014 -0400

----------------------------------------------------------------------
 src/main.js | 45 ++++++++++++++++++++++++++++-----------------
 1 file changed, 28 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/608e06d9/src/main.js
----------------------------------------------------------------------
diff --git a/src/main.js b/src/main.js
index 9b79bfd..4b3f4db 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,7 +26,7 @@ try {
 }
 
 module.exports = function() {
-    var commandList = [
+    var repoCommands = [
         {
             name: 'repo-clone',
             desc: 'Clones git repositories into the current working directory.',
@@ -51,11 +51,8 @@ module.exports = function() {
             name: 'list-repos',
             desc: 'Shows a list of valid values for the --repo flag.',
             entryPoint: require('./list-repos')
-        }, {
-            name: 'list-pulls',
-            desc: 'Shows a list of GitHub pull requests for all specified repositories.',
-            entryPoint: require('./list-pulls')
-        }, {
+        }];
+    var releaseCommands = [{
             name: 'prepare-release-branch',
             desc: 'Branches, updates JS, updates VERSION. Safe to run multiple times.',
             entryPoint: require('./cadance-release').prepareReleaseBranchCommand
@@ -84,6 +81,15 @@ module.exports = function() {
             desc: 'Prints out tags & hashes for the given repos. Used in VOTE emails.',
             entryPoint: require('./print-tags')
         }, {
+            name: 'list-release-urls',
+            desc: 'List the apache git repo urls for release artifacts.',
+            entryPoint: require('./list-release-urls')
+        }];
+    var otherCommands = [{
+            name: 'list-pulls',
+            desc: 'Shows a list of GitHub pull requests for all specified repositories.',
+            entryPoint: require('./list-pulls')
+        }, {
             name: 'last-week',
             desc: 'Prints out git logs of things that happened last week.',
             entryPoint: require('./last-week')
@@ -91,22 +97,27 @@ module.exports = function() {
             name: 'for-each',
             desc: 'Runs a shell command in each repo.',
             entryPoint: require('./for-each')
-        }, {
-            name: 'list-release-urls',
-            desc: 'List the apache git repo urls for release artifacts.',
-            entryPoint: require('./list-release-urls')
         }
     ];
     var commandMap = {};
-    for (var i = 0; i < commandList.length; ++i) {
-        commandMap[commandList[i].name] = commandList[i];
+    function addToCommandMap(cmd) {
+        commandMap[cmd.name] = cmd;
     }
-    var usage = 'Usage: $0 command [options]\n' +
-               '\n' +
-               'Valid commands:\n';
-    for (var i = 0; i < commandList.length; ++i) {
-        usage += '    ' + commandList[i].name + ': ' + commandList[i].desc + '\n';
+    repoCommands.forEach(addToCommandMap);
+    releaseCommands.forEach(addToCommandMap);
+    otherCommands.forEach(addToCommandMap);
+
+    var usage = 'Usage: $0 command [options]\n\n';
+    function addCommandUsage(cmd) {
+        usage += '    ' + cmd.name + ': ' + cmd.desc + '\n';
     }
+    usage += 'Repo Management:\n';
+    repoCommands.forEach(addCommandUsage);
+    usage += '\nRelease Management:\n';
+    releaseCommands.forEach(addCommandUsage);
+    usage += '\nOther Commands:\n';
+    otherCommands.forEach(addCommandUsage);
+
     usage += '\nFor help on a specific command: $0 command --help\n\n';
     usage += 'Some examples:\n';
     usage += '    ./cordova-coho/coho repo-clone -r plugins -r mobile-spec -r android -r ios -r cli\n';