/** * Picks up a {@link RepositoryBrowser} that matches the * given {@link SCM} from existing other jobs. * * @return * null if no applicable configuration was found. */ private RepositoryBrowser infer() { for( AbstractProject p : Jenkins.getInstance().allItems(AbstractProject.class) ) { SCM scm = p.getScm(); if (scm!=null && scm.getClass()==owner.getClass() && scm.getBrowser()!=null && ((SCMDescriptor)scm.getDescriptor()).isBrowserReusable(scm,owner)) { return scm.getBrowser(); } } return null; } }
/** * Returns the applicable {@link RepositoryBrowser} for files * controlled by this {@link SCM}. * @see #guessBrowser */ @SuppressWarnings("deprecation") @Exported(name="browser") public final @CheckForNull RepositoryBrowser<?> getEffectiveBrowser() { RepositoryBrowser<?> b = getBrowser(); if(b!=null) return b; if (useAutoBrowserHolder) { if (autoBrowserHolder == null) { autoBrowserHolder = new AutoBrowserHolder(this); } return autoBrowserHolder.get(); } else { try { return guessBrowser(); } catch (RuntimeException x) { LOGGER.log(Level.WARNING, null, x); return null; } } }
public RepositoryBrowser<?> superGetBrowser() { return super.getBrowser(); }
public MultiSCMChangeLogParser(List<SCM> scms) { scmLogParsers = new HashMap<String, ChangeLogParser>(); scmDisplayNames = new HashMap<String, String>(); scmRepositoryBrowsers = new HashMap<String, RepositoryBrowser<?>>(); for(SCM scm : scms) { String key = scm.getKey(); if(!scmLogParsers.containsKey(key)) { scmLogParsers.put(key, scm.createChangeLogParser()); String displayName = scm.getDescriptor().getDisplayName(); if (key != displayName) { displayName = String.format("%s (%s)", displayName, key); } scmDisplayNames.put(key, displayName); scmRepositoryBrowsers.put(key, scm.getBrowser()); } } }
/** * Picks up a {@link RepositoryBrowser} that matches the given {@link SCM} * from existing other jobs. * * @return null if no applicable configuration was found. */ private RepositoryBrowser infer() { for (AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class)) { SCM scm = p.getScm(); if (scm != null && scm.getClass() == owner.getClass() && scm.getBrowser() != null && ((SCMDescriptor) scm.getDescriptor()).isBrowserReusable(scm, owner)) { return scm.getBrowser(); } } return null; } }
/** * Picks up a {@link RepositoryBrowser} that matches the * given {@link SCM} from existing other jobs. * * @return * null if no applicable configuration was found. */ private RepositoryBrowser infer() { for( AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class) ) { SCM scm = p.getScm(); if (scm!=null && scm.getClass()==owner.getClass() && scm.getBrowser()!=null && ((SCMDescriptor)scm.getDescriptor()).isBrowserReusable(scm,owner)) { return scm.getBrowser(); } } return null; } }
/** * Picks up a {@link RepositoryBrowser} that matches the * given {@link SCM} from existing other jobs. * * @return * null if no applicable configuration was found. */ private RepositoryBrowser infer() { for( AbstractProject p : Jenkins.getInstance().allItems(AbstractProject.class) ) { SCM scm = p.getScm(); if (scm!=null && scm.getClass()==owner.getClass() && scm.getBrowser()!=null && ((SCMDescriptor)scm.getDescriptor()).isBrowserReusable(scm,owner)) { return scm.getBrowser(); } } return null; } }
/** * Picks up a {@link RepositoryBrowser} that matches the * given {@link SCM} from existing other jobs. * * @return * null if no applicable configuration was found. */ private RepositoryBrowser infer() { for( AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class) ) { SCM scm = p.getScm(); if (scm!=null && scm.getClass()==owner.getClass() && scm.getBrowser()!=null && ((SCMDescriptor)scm.getDescriptor()).isBrowserReusable(scm,owner)) { return scm.getBrowser(); } } return null; } }
/** * Picks up a {@link RepositoryBrowser} that matches the * given {@link SCM} from existing other jobs. * * @return * null if no applicable configuration was found. */ private RepositoryBrowser infer() { for( AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class) ) { SCM scm = p.getScm(); if (scm!=null && scm.getClass()==owner.getClass() && scm.getBrowser()!=null && ((SCMDescriptor)scm.getDescriptor()).isBrowserReusable(scm,owner)) { return scm.getBrowser(); } } return null; } }
@Override public RepositoryBrowser<?> getBrowser() { initPython(); if (pexec.isImplemented(1)) { return (RepositoryBrowser) pexec.execPython("get_browser"); } else { return super.getBrowser(); } }
/** * Returns the applicable {@link RepositoryBrowser} for files * controlled by this {@link SCM}. * * <p> * This method attempts to find applicable browser * from other job configurations. */ @Exported(name="browser") public final RepositoryBrowser<?> getEffectiveBrowser() { RepositoryBrowser<?> b = getBrowser(); if(b!=null) return b; if(autoBrowserHolder==null) autoBrowserHolder = new AutoBrowserHolder(this); return autoBrowserHolder.get(); }
/** * Returns the applicable {@link RepositoryBrowser} for files * controlled by this {@link SCM}. * * <p> * This method attempts to find applicable browser * from other job configurations. */ @Exported(name="browser") public final RepositoryBrowser<?> getEffectiveBrowser() { RepositoryBrowser<?> b = getBrowser(); if(b!=null) return b; if(autoBrowserHolder==null) autoBrowserHolder = new AutoBrowserHolder(this); return autoBrowserHolder.get(); }
/** * Returns the applicable {@link RepositoryBrowser} for files * controlled by this {@link SCM}. * @see #guessBrowser */ @SuppressWarnings("deprecation") @Exported(name="browser") public final @CheckForNull RepositoryBrowser<?> getEffectiveBrowser() { RepositoryBrowser<?> b = getBrowser(); if(b!=null) return b; if (useAutoBrowserHolder) { if (autoBrowserHolder == null) { autoBrowserHolder = new AutoBrowserHolder(this); } return autoBrowserHolder.get(); } else { return guessBrowser(); } }
/** * Returns the applicable {@link RepositoryBrowser} for files * controlled by this {@link SCM}. * * <p> * This method attempts to find applicable browser * from other job configurations. */ @Exported(name="browser") public final RepositoryBrowser<?> getEffectiveBrowser() { RepositoryBrowser<?> b = getBrowser(); if(b!=null) return b; if(autoBrowserHolder==null) autoBrowserHolder = new AutoBrowserHolder(this); return autoBrowserHolder.get(); }
/** * Returns the applicable {@link RepositoryBrowser} for files controlled by * this {@link SCM}. * * <p> This method attempts to find applicable browser from other job * configurations. */ @Exported(name = "browser") public final RepositoryBrowser<?> getEffectiveBrowser() { RepositoryBrowser<?> b = getBrowser(); if (b != null) { return b; } if (autoBrowserHolder == null) { autoBrowserHolder = new AutoBrowserHolder(this); } return autoBrowserHolder.get(); }
public static List<Change> getChanges(AbstractBuild<?, ?> build) { RepositoryBrowser repositoryBrowser = build.getProject().getScm().getBrowser(); List<Change> result = new ArrayList<>(); for (ChangeLogSet.Entry entry : build.getChangeSet()) { UserInfo user = UserInfo.getUser(entry.getAuthor()); String changeLink = null; if (repositoryBrowser != null) { try { @SuppressWarnings("unchecked") URL link = repositoryBrowser.getChangeSetLink(entry); if (link != null) { changeLink = link.toExternalForm(); } } catch (IOException e) { LOG.log(Level.WARNING, "Could not get changeset link for: " + build.getProject().getFullDisplayName() + " " + build.getDisplayName(), e); } } result.add(new Change(user, entry.getMsgAnnotated(), entry.getCommitId(), changeLink)); } return result; }