cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [2/7] git commit: Support another format for remote apache repo
Date Tue, 01 Oct 2013 15:01:20 GMT
Support another format for remote apache repo


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

Branch: refs/heads/master
Commit: 2ebe8642d922619f6de3309d56f88a30b063404f
Parents: c41029c
Author: Michal Mocny <mmocny@gmail.com>
Authored: Fri Sep 27 11:39:31 2013 -0400
Committer: Marcel Kinard <cmarcelk@gmail.com>
Committed: Tue Oct 1 10:56:26 2013 -0400

----------------------------------------------------------------------
 coho | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/2ebe8642/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index 6732961..50fa1af 100755
--- a/coho
+++ b/coho
@@ -1008,11 +1008,16 @@ function repoUpdateCommand(argv) {
 
 function determineApacheRemote(repo) {
     var fields = execHelper('git remote -v', true).split(/\s+/);
+    var ret = null;
     for (var i = 1; i < fields.length; i += 3) {
-        if (fields[i].indexOf('git-wip-us.apache.org/repos/asf/' + repo.repoName) != -1)
{
-            return fields[i - 1];
-        }
+        ['git-wip-us.apache.org/repos/asf/', 'git.apache.org/'].forEach(function(validRepo)
{
+            if (fields[i].indexOf(validRepo + repo.repoName) != -1) {
+                ret = fields[i - 1];
+            }
+        });
     }
+    if (ret)
+        return ret;
     fatal('Could not find an apache remote for repo ' + repo.repoName);
 }
 


Mime
View raw message