Great, thanks a lot! [cid:[email protected]] Dirk Heinrichs, Senior Systems Engineer, Infrastructure Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach Tel: +49 2226 1596666 1149 Email: [email protected]<mailto:[email protected]> Skype: dirk.heinrichs.recommind www.recommind.com<http://www.recommind.com/>
Von: [email protected] [mailto:[email protected]] Im Auftrag von Stephen Connolly Gesendet: Freitag, 31. Mai 2013 13:43 An: [email protected] Betreff: Re: Find out which project uses a specific SCM repository Doeth... slightly better for (AbstractProject project: Jenkins.getInstance().getAllItems(AbstractProject.class)) { if (item.getSCM() instanceof MercurialSCM) { MercurialSCM hg = (MercurialSCM)item.getSCM() if (repo.matcher().matches(hg.getSource())) result.add(project); } } On 31 May 2013 12:41, Stephen Connolly <[email protected]<mailto:[email protected]>> wrote: Pattern repo = ...; List<AbstractProject<?,?>> result = new ArrayList<AbstractProject<?,?>>(); for (Item item: Jenkins.getInstance().getAllItems()) { if (item instanceof AbstractProject) { AbstractProject<?,?> project = (AbstractProject)item; if (item.getSCM() instanceof MercurialSCM) { MercurialSCM hg = (MercurialSCM)item.getSCM() if (repo.matcher().matches(hg.getSource())) result.add(project); } } } On 31 May 2013 11:47, Dirk Heinrichs <[email protected]<mailto:[email protected]>> wrote: Hi, is it possible to (programmatically) find out which projects use a given (Mercurial) repository? If so, how? Thanks... Dirk [cid:[email protected]] Dirk Heinrichs, Senior Systems Engineer, Infrastructure Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach Tel: +49 2226 1596666<tel:%2B49%202226%201596666> 1149 Email: [email protected]<mailto:[email protected]> Skype: dirk.heinrichs.recommind www.recommind.com<http://www.recommind.com/> -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:jenkinsci-users%[email protected]>. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. For more options, visit https://groups.google.com/groups/opt_out. http://www.recommind.com -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
<<inline: image001.gif>>
