You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mm...@apache.org on 2013/09/27 17:43:18 UTC
git commit: Support another format for remote apache repo
Updated Branches:
refs/heads/master 9a210c3da -> 3bef4d510
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/3bef4d51
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/3bef4d51
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/3bef4d51
Branch: refs/heads/master
Commit: 3bef4d51033ca9eb908838cd345f4e2c437ad374
Parents: 9a210c3
Author: Michal Mocny <mm...@gmail.com>
Authored: Fri Sep 27 11:39:31 2013 -0400
Committer: Michal Mocny <mm...@gmail.com>
Committed: Fri Sep 27 11:39:31 2013 -0400
----------------------------------------------------------------------
coho | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/3bef4d51/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);
}