Remove the repository name from PACKAGE_NAME and move it to the new REPOSITORY_NAME symbol.
--
MOS_MIGRATED_REVID=105954652
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Runtime.java b/src/main/java/com/google/devtools/build/lib/syntax/Runtime.java
index ef008c3..754d904 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/Runtime.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/Runtime.java
@@ -82,6 +82,14 @@
+ "function is loaded), but not as a top level function call in the extension module.")
public static final String PKG_NAME = "PACKAGE_NAME";
+ @SkylarkSignature(name = "REPOSITORY_NAME", returnType = String.class,
+ doc = "The name of the repository the rule or build extension is called from. "
+ + "For example, in packages that are called into existence by the WORKSPACE stanza "
+ + "<code>local_repository(name='local', path=...)</code> it will be set to "
+ + "<code>@local</code>. In packages in the main repository, it will be empty. "
+ + "It can only be accessed in functions (transitively) called from BUILD files.")
+ public static final String REPOSITORY_NAME = "REPOSITORY_NAME";
+
/**
* Set up a given environment for supported class methods.
*/