allow revisions to be specified for scm:diff
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@179024 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
15d899d3df
commit
cd2eaf0c19
@ -34,6 +34,8 @@ import java.io.File;
|
||||
public class ScmDiffBean extends ScmPatternBean
|
||||
{
|
||||
private String patchFile;
|
||||
private String startRevision;
|
||||
private String endRevision;
|
||||
|
||||
public void diff()
|
||||
throws Exception
|
||||
@ -43,7 +45,7 @@ public class ScmDiffBean extends ScmPatternBean
|
||||
ScmRepository repository = getScmRepository( scmManager );
|
||||
|
||||
ScmFileSet fileSet = new ScmFileSet( new File( getWorkingDirectory() ), getIncludes(), getExcludes() );
|
||||
DiffScmResult result = scmManager.diff( repository, fileSet, null, null );
|
||||
DiffScmResult result = scmManager.diff( repository, fileSet, startRevision, endRevision );
|
||||
checkResult( result );
|
||||
|
||||
FileUtils.fileWrite( patchFile, result.getPatch() );
|
||||
@ -59,5 +61,23 @@ public class ScmDiffBean extends ScmPatternBean
|
||||
return patchFile;
|
||||
}
|
||||
|
||||
}
|
||||
public String getStartRevision()
|
||||
{
|
||||
return startRevision;
|
||||
}
|
||||
|
||||
public void setStartRevision(String startRevision)
|
||||
{
|
||||
this.startRevision = startRevision;
|
||||
}
|
||||
|
||||
public String getEndRevision()
|
||||
{
|
||||
return endRevision;
|
||||
}
|
||||
|
||||
public void setEndRevision(String endRevision)
|
||||
{
|
||||
this.endRevision = endRevision;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user