mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
Adding optional <kind> attribute to changelogsets for ease of identification.
Currently only implemented for CVS & SVN; could be done for others when the plugins have a new hudson-core dep. See https://stapler.dev.java.net/nonav/issues/show_bug.cgi?id=4 for background. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15302 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
709ba8763b
commit
41732b6dfd
3 files changed
+20
No files matched your search
@@ -72,6 +72,11 @@ public final class CVSChangeLogSet extends ChangeLogSet<CVSChangeLog> {
|
||||
return logs.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKind() {
|
||||
return "cvs";
|
||||
}
|
||||
|
||||
public static CVSChangeLogSet parse( AbstractBuild build, java.io.File f ) throws IOException, SAXException {
|
||||
Digester digester = new Digester2();
|
||||
ArrayList<CVSChangeLog> r = new ArrayList<CVSChangeLog>();
|
||||
|
||||
@@ -78,6 +78,16 @@ public abstract class ChangeLogSet<T extends ChangeLogSet.Entry> implements Iter
|
||||
return r.toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional identification of the kind of SCM being used.
|
||||
* @return a short token, such as the SCM's main CLI executable name
|
||||
* @since 1.284
|
||||
*/
|
||||
@Exported
|
||||
public String getKind() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constant instance that represents no changes.
|
||||
*/
|
||||
|
||||
@@ -78,6 +78,11 @@ public final class SubversionChangeLogSet extends ChangeLogSet<LogEntry> {
|
||||
return logs.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKind() {
|
||||
return "svn";
|
||||
}
|
||||
|
||||
public synchronized Map<String,Long> getRevisionMap() throws IOException {
|
||||
if(revisionMap==null)
|
||||
revisionMap = SubversionSCM.parseRevisionFile(build);
|
||||
|
||||
Reference in new issue
Block a user