File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\core\src\main\java\hudson\scm\SCMRevisionState.java.html

1 package hudson.scm;
2
3 import hudson.FilePath;
4 import hudson.Launcher;
5 import hudson.model.AbstractBuild;
6 import hudson.model.AbstractProject;
7 import hudson.model.Action;
8 import hudson.model.TaskListener;
9
10 /**
11 * Immutable object that represents revisions of the files in the repository,
12 * used to represent the result of
13 * {@linkplain SCM#poll(AbstractProject, Launcher, FilePath, TaskListener, SCMRevisionState) a SCM polling}.
14 *
15 * <p>
16 * This object is used so that the successive polling can compare the tip of the repository now vs
17 * what it was when it was last polled. (Before 1.345, Hudson was only able to compare the tip
18 * of the repository vs the state of the workspace, which resulted in a problem like HUDSON-2180.
19 *
20 * <p>
21 * {@link SCMRevisionState} is persisted as an action to {@link AbstractBuild}.
22 *
23 * @author Kohsuke Kawaguchi
24 * @since 1.345
25 */
26 public abstract class SCMRevisionState implements Action {
27 public String getIconFileName() {
28 return null;
29 }
30
31 public String getDisplayName() {
32 return null;
33 }
34
35 public String getUrlName() {
36 return null;
37 }
38
39 /*
40 I can't really make this comparable because comparing two revision states often requires
41 non-trivial computation and conversations with the repository (mainly to figure out
42 which changes are insignificant and which are not.)
43
44 So instead, here we opt to a design where we tell SCM upfront about what we are comparing
45 against (baseline), and have it give us the new state and degree of change in PollingResult.
46 */
47
48 public static SCMRevisionState NONE = new None();
49
50 private static final class None extends SCMRevisionState {}
51 }
52