[ARVADOS] updated: 254bd074877ddc11a0ff846e2eb740dbfaa059fe
git at public.curoverse.com
git at public.curoverse.com
Thu Dec 4 17:58:38 EST 2014
Summary of changes:
apps/workbench/app/assets/javascripts/arvados_client.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
via 254bd074877ddc11a0ff846e2eb740dbfaa059fe (commit)
from 90ecd742ac7b8560634d6f9ad557d149954596ad (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 254bd074877ddc11a0ff846e2eb740dbfaa059fe
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Dec 4 17:58:51 2014 -0500
3781: One less Regexp.
diff --git a/apps/workbench/app/assets/javascripts/arvados_client.js b/apps/workbench/app/assets/javascripts/arvados_client.js
index eaffaf7..b3f18ad 100644
--- a/apps/workbench/app/assets/javascripts/arvados_client.js
+++ b/apps/workbench/app/assets/javascripts/arvados_client.js
@@ -61,8 +61,7 @@ function ArvadosClient(arvadosApiToken, arvadosDiscoveryUri) {
var nameStub = origName;
var suffixInt = null;
var ok = false;
- var lineMatch, linesRe = /[^\n]+/g;
- var streamNameMatch, streamNameRe = /^\S+/;
+ var lineMatch, linesRe = /(\S+).*/gm;
var fileTokenMatch, fileTokensRe = / \d+:\d+:(\S+)/g;
while (!ok) {
ok = true;
@@ -72,10 +71,11 @@ function ArvadosClient(arvadosApiToken, arvadosDiscoveryUri) {
replace(/ /g, '\\040');
while (ok && null !==
(lineMatch = linesRe.exec(manifest))) {
- streamNameMatch = streamNameRe.exec(lineMatch[0]);
+ // lineMatch is [theEntireLine, streamName]
while (ok && null !==
(fileTokenMatch = fileTokensRe.exec(lineMatch[0]))) {
- if (streamNameMatch[0] + '/' + fileTokenMatch[1]
+ // fileTokenMatch is [theEntireToken, fileName]
+ if (lineMatch[1] + '/' + fileTokenMatch[1]
===
newStreamName + '/' + newName) {
ok = false;
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list