Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CDBD7200B89 for ; Wed, 21 Sep 2016 15:24:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CC785160ADB; Wed, 21 Sep 2016 13:24:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1D507160ACF for ; Wed, 21 Sep 2016 15:24:48 +0200 (CEST) Received: (qmail 99223 invoked by uid 500); 21 Sep 2016 13:24:48 -0000 Mailing-List: contact commits-help@whimsical.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@whimsical.apache.org Delivered-To: mailing list commits@whimsical.apache.org Received: (qmail 99214 invoked by uid 99); 21 Sep 2016 13:24:48 -0000 Received: from Unknown (HELO matt-storage.apache.org) (207.244.88.132) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2016 13:24:48 +0000 Received: by matt-storage.apache.org (ASF Mail Server at matt-storage.apache.org, from userid 33) id DE7835FAF3; Wed, 21 Sep 2016 13:24:46 +0000 (UTC) Date: Wed, 21 Sep 2016 13:24:46 +0000 To: "commits@whimsical.apache.org" Subject: [whimsy] branch master updated: warn if file already exists MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <20160921132446.31049.94604@matt-storage.apache.org> From: rubys@apache.org Reply-To: "commits@whimsical.apache.org" X-Git-Host: matt-storage.apache.org X-Git-Repo: whimsy X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: aeeca4c9e7fb8acab290d699a536242625c6458f X-Git-Newrev: b863bc4adbcf9fa9cb03d903df847489448c6446 X-Git-Rev: b863bc4adbcf9fa9cb03d903df847489448c6446 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.3.dev Auto-Submitted: auto-generated archived-at: Wed, 21 Sep 2016 13:24:50 -0000 This is an automated email from the ASF dual-hosted git repository. rubys pushed a commit to branch master in repository https://git-dual.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new b863bc4 warn if file already exists b863bc4 is described below commit b863bc4adbcf9fa9cb03d903df847489448c6446 Author: Sam Ruby AuthorDate: Wed Sep 21 09:24:31 2016 -0400 warn if file already exists --- www/secmail/views/actions/ccla.json.rb | 8 ++++++++ www/secmail/views/actions/grant.json.rb | 8 ++++++++ www/secmail/views/actions/icla.json.rb | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/www/secmail/views/actions/ccla.json.rb b/www/secmail/views/actions/ccla.json.rb index 32c2bf4..2206e1f 100644 --- a/www/secmail/views/actions/ccla.json.rb +++ b/www/secmail/views/actions/ccla.json.rb @@ -11,6 +11,14 @@ message = Mailbox.find(@message) # extract file extension fileext = File.extname(@selected) if @signature.empty? +# verify that a CCLA under that name doesn't already exist +if "#@filename#{fileext}" =~ /\w[-\w]*\.?\w*/ + ccla = "#{ASF::SVN['private/documents/cclas']}/#@filename#{fileext}" + if File.exist? ccla.untaint + _warn "documents/cclas/#@filename#{fileext} already exists" + end +end + # extract/verify project if @project and not @project.empty? pmc = ASF::Committee[@project] diff --git a/www/secmail/views/actions/grant.json.rb b/www/secmail/views/actions/grant.json.rb index d12493d..2adbfb8 100644 --- a/www/secmail/views/actions/grant.json.rb +++ b/www/secmail/views/actions/grant.json.rb @@ -11,6 +11,14 @@ message = Mailbox.find(@message) # extract file extension fileext = File.extname(@selected) if @signature.empty? +# verify that a grant under that name doesn't already exist +if "#@filename#{fileext}" =~ /\w[-\w]*\.?\w*/ + grant = "#{ASF::SVN['private/documents/grants']}/#@filename#{fileext}" + if File.exist? grant.untaint + _warn "documents/grants/#@filename#{fileext} already exists" + end +end + # extract/verify project if @project and not @project.empty? pmc = ASF::Committee[@project] diff --git a/www/secmail/views/actions/icla.json.rb b/www/secmail/views/actions/icla.json.rb index bbb8472..6881234 100644 --- a/www/secmail/views/actions/icla.json.rb +++ b/www/secmail/views/actions/icla.json.rb @@ -13,6 +13,14 @@ message = Mailbox.find(@message) # extract file extension fileext = File.extname(@selected) if @signature.empty? +# verify that an ICLA under that name doesn't already exist +if "#@filename#{fileext}" =~ /\w[-\w]*\.?\w*/ + icla = "#{ASF::SVN['private/documents/iclas']}/#@filename#{fileext}" + if File.exist? icla.untaint + _warn "documents/iclas/#@filename#{fileext} already exists" + end +end + # extract/verify project if @project and not @project.empty? pmc = ASF::Committee[@project] -- To stop receiving notification emails like this one, please contact ['"commits@whimsical.apache.org" '].