Skip to content

Commits on Source 9

......@@ -6,3 +6,4 @@
*.css text
*.js text
*.sql text
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
asfMavenTlpStdBuild()
maven-scm (1.11.1-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Refreshed the patch
* Standards-Version updated to 4.2.1
* Switch to debhelper level 11
* Use salsa.debian.org Vcs-* URLs
-- Emmanuel Bourg <ebourg@apache.org> Mon, 26 Nov 2018 00:36:16 +0100
maven-scm (1.9.5-1) unstable; urgency=medium
* Team upload.
......
......@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders: Ludovic Claude <ludovic.claude@laposte.net>
Build-Depends:
debhelper (>= 10),
debhelper (>= 11),
default-jdk,
default-jdk-doc,
junit4,
......@@ -19,9 +19,9 @@ Build-Depends:
libplexus-utils2-java,
maven-debian-helper (>= 1.4),
subversion
Standards-Version: 4.0.0
Vcs-Git: https://anonscm.debian.org/git/pkg-java/maven-scm.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/maven-scm.git
Standards-Version: 4.2.1
Vcs-Git: https://salsa.debian.org/java-team/maven-scm.git
Vcs-Browser: https://salsa.debian.org/java-team/maven-scm
Homepage: http://maven.apache.org/scm/
Package: libmaven-scm-java
......
......@@ -17,7 +17,7 @@ Forwarded: not-needed
fail( "getModule() must be overridden." );
--- a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/test/java/org/apache/maven/scm/provider/svn/svnexe/command/changelog/SvnChangeLogConsumerTest.java
+++ b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/test/java/org/apache/maven/scm/provider/svn/svnexe/command/changelog/SvnChangeLogConsumerTest.java
@@ -57,7 +57,7 @@
@@ -56,7 +56,7 @@
{
super.setUp();
......
......@@ -2,6 +2,3 @@
%:
dh $@
get-orig-source:
uscan --download-current-version --force-download --rename
version=3
version=4
opts="repack,compression=xz" \
https://github.com/apache/maven-scm/releases .*/maven-scm-([\d\.]+).tar.gz
......@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm</artifactId>
<version>1.9.5</version>
<version>1.11.1</version>
</parent>
<artifactId>maven-scm-api</artifactId>
......
......@@ -34,6 +34,8 @@ public class CommandParameter
public static final CommandParameter RECURSIVE = new CommandParameter( "recursive" );
public static final CommandParameter SHALLOW = new CommandParameter( "shallow" );
public static final CommandParameter MESSAGE = new CommandParameter( "message" );
public static final CommandParameter BRANCH_NAME = new CommandParameter( "branchName" );
......
......@@ -394,10 +394,10 @@ private void setObject( CommandParameter parameter, Object value )
/**
* Removes a parameter, silent if it didn't exist.
*
* @param parameter name of the parameter to remove
* @param parameter to remove
*/
public void remove( CommandParameter parameter )
{
parameters.remove( parameter );
parameters.remove( parameter.getName() );
}
}
......@@ -34,11 +34,14 @@ public class ScmBranchParameters
private boolean remoteBranching = false;
private boolean pinExternals = false;
private String scmRevision;
public ScmBranchParameters()
{
this.remoteBranching = false;
this.pinExternals = false;
}
public ScmBranchParameters( String message )
......@@ -76,6 +79,16 @@ public void setRemoteBranching( boolean remoteBranching )
this.remoteBranching = remoteBranching;
}
public boolean isPinExternals()
{
return pinExternals;
}
public void setPinExternals( boolean pinExternals )
{
this.pinExternals = pinExternals;
}
public String toString()
{
return "[" + scmRevision + "] " + message;
......
......@@ -102,8 +102,7 @@ public ScmFileSet( File basedir, String includes, String excludes )
{
excludes = DEFAULT_EXCLUDES;
}
@SuppressWarnings( "unchecked" )
List<File> fileList = (List<File>) FileUtils.getFiles( basedir, includes, excludes, false );
List<File> fileList = FileUtils.getFiles( basedir, includes, excludes, false );
this.files = fileList;
this.includes = includes;
this.excludes = excludes;
......
......@@ -44,7 +44,7 @@ public class ScmResult
public static final String PASSWORD_PLACE_HOLDER = "********";
//works for SVN and git
private Pattern patternForUserColonPasswordAtHost = Pattern.compile( "^.*:(.*)@.*$" );
private Pattern patternForUserColonPasswordAtHost = Pattern.compile( "^.*:(.*)@.*$", Pattern.DOTALL );
/**
* Copy constructor.
......
......@@ -34,11 +34,17 @@ public class ScmTagParameters
private boolean remoteTagging = false;
private boolean pinExternals = false;
private boolean sign = false;
private String scmRevision;
public ScmTagParameters()
{
this.remoteTagging = false;
this.pinExternals = false;
this.sign = false;
}
public ScmTagParameters( String message )
......@@ -66,6 +72,26 @@ public void setRemoteTagging( boolean remoteTagging )
this.remoteTagging = remoteTagging;
}
public boolean isPinExternals()
{
return pinExternals;
}
public void setPinExternals( boolean pinExternals )
{
this.pinExternals = pinExternals;
}
public boolean isSign()
{
return sign;
}
public void setSign( boolean sign )
{
this.sign = sign;
}
public String getScmRevision()
{
return scmRevision;
......
......@@ -55,6 +55,14 @@ protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo
throw new ScmException( "Unsupported method for this provider." );
}
@Deprecated
protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
ScmVersion version, String datePattern )
throws ScmException
{
throw new ScmException( "Unsupported method for this provider." );
}
/**
* {@inheritDoc}
*/
......@@ -76,13 +84,21 @@ public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fi
ScmBranch branch = (ScmBranch) parameters.getScmVersion( CommandParameter.BRANCH, null );
ScmVersion version = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
ScmVersion startVersion = parameters.getScmVersion( CommandParameter.START_SCM_VERSION, null );
ScmVersion endVersion = parameters.getScmVersion( CommandParameter.END_SCM_VERSION, null );
String datePattern = parameters.getString( CommandParameter.CHANGELOG_DATE_PATTERN, null );
if ( startVersion != null || endVersion != null )
boolean versionOnly = startVersion == null && endVersion == null && version != null;
if ( versionOnly )
{
return executeChangeLogCommand( repository, fileSet, version, datePattern );
}
else if ( startVersion != null || endVersion != null )
{
return executeChangeLogCommand( repository, fileSet, startVersion, endVersion, datePattern );
}
......
......@@ -175,4 +175,15 @@ public void setDateRange( Date startDate, Date endDate )
setEndDate( endDate );
}
public void setRevision( ScmVersion revision )
throws ScmException
{
parameters.setScmVersion( CommandParameter.SCM_VERSION, revision );
}
public ScmVersion getRevision()
throws ScmException
{
return parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
}
}
......@@ -45,13 +45,13 @@ public abstract class AbstractCheckOutCommand
* @param scmVersion not null
* @return the checkout result
* @throws ScmException if any
* @see #executeCheckOutCommand(ScmProviderRepository, ScmFileSet, ScmVersion, boolean)
* @see #executeCheckOutCommand(ScmProviderRepository, ScmFileSet, ScmVersion, boolean, boolean)
*/
protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repository, ScmFileSet fileSet,
ScmVersion scmVersion )
throws ScmException
{
return executeCheckOutCommand( repository, fileSet, scmVersion, true );
return executeCheckOutCommand( repository, fileSet, scmVersion, true, false );
}
/**
......@@ -61,12 +61,14 @@ protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository reposi
* @param fileSet not null
* @param scmVersion not null
* @param recursive <code>true</code> if recursive check out is wanted, <code>false</code> otherwise.
* @param shallow <code>true</code> if shallow check out is wanted, <code>false</code> otherwise.
* @return the checkout result
* @throws ScmException if any
* @since 1.1.1
*/
protected abstract CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repository, ScmFileSet fileSet,
ScmVersion scmVersion, boolean recursive )
ScmVersion scmVersion, boolean recursive,
boolean shallow )
throws ScmException;
/** {@inheritDoc} */
......@@ -75,13 +77,8 @@ public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fi
throws ScmException
{
ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
String recursiveParam = parameters.getString( CommandParameter.RECURSIVE, null );
if ( recursiveParam != null )
{
boolean recursive = parameters.getBoolean( CommandParameter.RECURSIVE );
return executeCheckOutCommand( repository, fileSet, scmVersion, recursive );
}
return executeCheckOutCommand( repository, fileSet, scmVersion );
boolean recursive = parameters.getBoolean( CommandParameter.RECURSIVE, true );
boolean shallow = parameters.getBoolean( CommandParameter.SHALLOW, false );
return executeCheckOutCommand( repository, fileSet, scmVersion, recursive, shallow );
}
}
......@@ -167,9 +167,12 @@ public AddScmResult add( ScmRepository repository, ScmFileSet fileSet, CommandPa
{
login( repository, fileSet );
if ( parameters.getString( CommandParameter.BINARY , null ) == null )
{
// TODO: binary may be dependant on particular files though
// TODO: set boolean?
parameters.setString( CommandParameter.BINARY, "false" );
}
return add( repository.getProviderRepository(), fileSet, parameters );
}
......@@ -497,6 +500,20 @@ public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet,
return checkout( repository.getProviderRepository(), fileSet, parameters );
}
@Override
public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion,
CommandParameters commandParameters )
throws ScmException
{
login( repository, fileSet );
if ( scmVersion != null && commandParameters.getScmVersion( CommandParameter.SCM_VERSION, null ) == null )
{
commandParameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion );
}
return checkout( repository.getProviderRepository(), fileSet, commandParameters );
}
protected CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
......
......@@ -492,6 +492,22 @@ CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet,
boolean recursive )
throws ScmException;
/**
* Create a copy of the repository on your local machine.
*
* @param scmRepository the source control system
* @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()}
* location
* @param version get the version defined by the revision, branch or tag
* @param commandParameters parameters
* @return
* @throws ScmException if any
* @since 1.9.6
*/
CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version , //
CommandParameters commandParameters )
throws ScmException;
/**
* Create a diff between two branch/tag/revision.
*
......