cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/4] cordova-coho git commit: Ignore svn repos by default
Date Sat, 11 Apr 2015 02:23:01 GMT
Ignore svn repos by default


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

Branch: refs/heads/master
Commit: c50157e330af58081b93a81f6aacf75b4c7e317c
Parents: 44b760f
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Fri Apr 10 10:23:08 2015 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Apr 10 10:43:18 2015 -0400

----------------------------------------------------------------------
 src/flagutil.js    | 13 ++++++++++++-
 src/repo-clone.js  |  2 +-
 src/repo-update.js |  2 +-
 3 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/c50157e3/src/flagutil.js
----------------------------------------------------------------------
diff --git a/src/flagutil.js b/src/flagutil.js
index 58244a8..29676db 100644
--- a/src/flagutil.js
+++ b/src/flagutil.js
@@ -58,7 +58,7 @@ function resolveCwdRepo() {
     }
 }
 
-exports.computeReposFromFlag = function(flagValue) {
+exports.computeReposFromFlag = function(flagValue, includeSvn) {
     var values = flagValue === true ? [] : Array.isArray(flagValue) ? flagValue : [flagValue];
     var ret = [];
     var addedIds = {};
@@ -82,6 +82,17 @@ exports.computeReposFromFlag = function(flagValue) {
             apputil.fatal('Invalid repo value: ' + value + '\nUse the list-repos command
to see value values.');
         }
     });
+    if (!includeSvn) {
+        var hadSvn = false;
+        ret = ret.filter(function(r) {
+            hadSvn = hadSvn || !!r.svn;
+            return !r.svn;
+        });
+        if (hadSvn && !(values.length == 1 && values[0] == 'auto')) {
+            console.warn('Skipping one or more non-git repos');
+        }
+    }
+
     return ret;
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/c50157e3/src/repo-clone.js
----------------------------------------------------------------------
diff --git a/src/repo-clone.js b/src/repo-clone.js
index eb35d26..15e2adb 100644
--- a/src/repo-clone.js
+++ b/src/repo-clone.js
@@ -40,7 +40,7 @@ module.exports = function*(argv) {
 
     var depth = argv.depth ? argv.depth : null;
 
-    var repos = flagutil.computeReposFromFlag(argv.r);
+    var repos = flagutil.computeReposFromFlag(argv.r, true);
     yield cloneRepos(repos, false, depth);
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/c50157e3/src/repo-update.js
----------------------------------------------------------------------
diff --git a/src/repo-update.js b/src/repo-update.js
index ac6f25f..5c77f00 100644
--- a/src/repo-update.js
+++ b/src/repo-update.js
@@ -63,7 +63,7 @@ module.exports = function*(argv) {
     var depth = argv.depth ? argv.depth : null;
 
     var branches = Array.isArray(argv.b) ? argv.b : [argv.b];
-    var repos = flagutil.computeReposFromFlag(argv.r);
+    var repos = flagutil.computeReposFromFlag(argv.r, true);
     apputil.prefixLength = Math.max.apply(null,
         [apputil.prefixLength].concat(
             repos.map(function (r) { return r.repoName.length + 2; }))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message