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 2013/08/30 17:20:41 UTC
git commit: CB-4710 : repo-update will clone any missing repos
Updated Branches:
refs/heads/master 0033b1e82 -> 412a7bd12
CB-4710 : repo-update will clone any missing repos
Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/412a7bd1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/412a7bd1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/412a7bd1
Branch: refs/heads/master
Commit: 412a7bd1219c7cc0c29b5560ff5604d0081523c2
Parents: 0033b1e
Author: David Kemp <dr...@chromium.org>
Authored: Fri Aug 30 10:21:32 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Aug 30 11:20:34 2013 -0400
----------------------------------------------------------------------
coho | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/412a7bd1/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index 6895d5f..ea56ade 100755
--- a/coho
+++ b/coho
@@ -509,7 +509,7 @@ function createReleaseCommand(argv) {
fatal('Expected path to exist: ' + binPath);
}
- cloneRepos(repos);
+ cloneRepos(repos,false);
if (argv.update) {
// No need to update branches, just do a git fetch --tags.
updateRepos(repos, [], false);
@@ -710,17 +710,17 @@ function repoCloneCommand(argv) {
process.exit(1);
}
var repos = computeReposFromFlag(argv.r);
- cloneRepos(repos);
+ cloneRepos(repos, false);
process.exit(0);
}
-function cloneRepos(repos) {
+function cloneRepos(repos, quiet) {
var failures = [];
var numSkipped = 0;
repos.forEach(function(repo) {
if (shjs.test('-d', repo.repoName)) {
- print('Repo already cloned: ' + repo.repoName);
+ if(!quiet) print('Repo already cloned: ' + repo.repoName);
numSkipped +=1 ;
} else {
var code = shjs.exec('git clone --progress ' + createRepoUrl(repo)).code;
@@ -939,6 +939,8 @@ function repoUpdateCommand(argv) {
var branches = Array.isArray(argv.b) ? argv.b : [argv.b];
var repos = computeReposFromFlag(argv.r);
+ // ensure that any missing repos are cloned
+ cloneRepos(repos,true);
updateRepos(repos, branches, !argv.fetch);
process.exit(0);
}