From 6fae7a014a2a0007ef18c45979f980e461bb81d7 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Thu, 23 Jul 2009 21:06:13 +0000 Subject: [PATCH] added a note about the invocation timing. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20095 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/scm/SCM.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/hudson/scm/SCM.java b/core/src/main/java/hudson/scm/SCM.java index cd38c8dd4b..cee145b09b 100644 --- a/core/src/main/java/hudson/scm/SCM.java +++ b/core/src/main/java/hudson/scm/SCM.java @@ -244,6 +244,12 @@ public abstract class SCM implements Describable, ExtensionPoint { *

* This can be used to propagate information from SCM to builds * (for example, SVN revision number.) + * + *

+ * This method is invoked whenever someone does {@link AbstractBuild#getEnvironment(TaskListener)}, which + * can be before/after your checkout method is invoked. So if you are going to provide information about + * check out (like SVN revision number that was checked out), be prepared for the possibility that the + * check out hasn't happened yet. */ public void buildEnvVars(AbstractBuild build, Map env) { // default implementation is noop.