continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzurb...@apache.org
Subject svn commit: r767836 - /continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
Date Thu, 23 Apr 2009 07:40:53 GMT
Author: jzurbano
Date: Thu Apr 23 07:40:53 2009
New Revision: 767836

URL: http://svn.apache.org/viewvc?rev=767836&view=rev
Log:
merge -r 767815:767816

Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java?rev=767836&r1=767835&r2=767836&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
Thu Apr 23 07:40:53 2009
@@ -112,7 +112,18 @@
                                                         this.getBuildDefinitionTemplateId()
);
         }
         
-        AuditLog event = new AuditLog( pomUrl, AuditLogConstants.ADD_M2_PROJECT );
+        String projectUrl = pomUrl;
+        
+        if ( projectUrl.indexOf( "@" ) > 0 )
+        {
+            // remove scm credentials from the url
+            StringBuilder urlBuilder = new StringBuilder();
+            urlBuilder.append( projectUrl.substring( 0, projectUrl.indexOf( "://" ) + 3 )
);
+            urlBuilder.append( projectUrl.substring( projectUrl.indexOf( "@" ) + 1 ) );
+            projectUrl = urlBuilder.toString();
+        }
+        
+        AuditLog event = new AuditLog( projectUrl, AuditLogConstants.ADD_M2_PROJECT );
         event.setCategory( AuditLogConstants.PROJECT );
         event.setCurrentUser( getPrincipal() );
         event.log();



Mime
View raw message