Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Groovy API: how to get repository client specification? #2214

malafees ·
Hi,

Is it possible to retrive information (such as perforce client specification) from specific repository using groovy API?

If I use
configuration.getRepository("REPO")
I can get only very general info about repository.
But I need to get perforce client specification (view or stream). I use Perforce repository.
  • replies 2
  • views 1309
  • stars 0
robinshen ADMIN ·
Try below:
groovy:
def repo = repositories.get("REPO")
def spec = repo.staticSpecProvider.staticSpec
logger.info(spec.stream)
for (mapping in spec.mappings) {
logger.info(mapping.depotPath)
logger.info(mapping.clientPath)
logger.info("" + mapping.overlay)
logger.info("" + mapping.exclude)
}
malafees ·
Thanks!!!