From: Richard C. <ri...@cy...> - 2005-11-30 19:55:17
|
Hi Eric, Nice one. I didn't know about Jcvsweb. Looks like a nice project. Did you do the other changes that are necessary for proper integration? Like adding a command line switch and setting up the JcvswebIntegration instance in ConfigurationOptions? If you did, could you please create a patch and add it to the SourceForge patch tracker [1]? (Ideally, it would also contain a new section for the manual [2] -- hint, hint!) Cheers, Richard [1] http://sourceforge.net/tracker/?group_id=57558&atid=484571 [2] http://cvs.sourceforge.net/viewcvs.py/statcvs/htdocs/manual/ index.html?rev=HEAD&view=auto On 21 Nov 2005, at 23:07, Eric Meaney wrote: > Here is the source for the class I wrote to integrate with Jcvsweb > (http://www.jcvs.org/jcvsweb/) if anyone is interested. > > /** > * > */ > package net.sf.statcvs.output; > > import java.util.HashSet; > import java.util.Set; > > import net.sf.statcvs.model.CvsFile; > import net.sf.statcvs.model.CvsRevision; > import net.sf.statcvs.model.Directory; > > /** > * @author ERMEANEY > * > */ > public class JcvswebIntegration implements WebRepositoryIntegration { > private String baseURL; > private Set atticFileNames = new HashSet(); > /** > * > */ > public JcvswebIntegration(String baseURL) { > if (baseURL.endsWith("/")) { > this.baseURL = baseURL.substring(0, baseURL.length() - 1); > } else { > this.baseURL = baseURL; > } > } > > /* (non-Javadoc) > * @see net.sf.statcvs.output.WebRepositoryIntegration#getName() > */ > public String getName() { > return "JcvsWeb"; > } > > /* (non-Javadoc) > * @see > net.sf.statcvs.output.WebRepositoryIntegration#getDirectoryUrl > (net.sf.statcvs.model.Directory) > */ > public String getDirectoryUrl(Directory directory) { > String path = baseURL + "/HEAD/list/" + directory.getPath(); > return path; > } > > /* (non-Javadoc) > * @see > net.sf.statcvs.output.WebRepositoryIntegration#getFileHistoryUrl > (net.sf.statcvs.model.CvsFile) > */ > public String getFileHistoryUrl(CvsFile file) { > return baseURL + "/HEAD/vers/" + file.getFilenameWithPath(); > } > > /* (non-Javadoc) > * @see > net.sf.statcvs.output.WebRepositoryIntegration#getFileViewUrl > (net.sf.statcvs.model.CvsFile) > */ > public String getFileViewUrl(CvsFile file) { > return baseURL + "/HEAD/view/" + file.getFilenameWithPath() + > "/" + file.getLatestRevision().getRevisionNumber(); > } > > /* (non-Javadoc) > * @see > net.sf.statcvs.output.WebRepositoryIntegration#getFileViewUrl > (net.sf.statcvs.model.CvsRevision) > */ > public String getFileViewUrl(CvsRevision revision) { > return baseURL + "/HEAD/view/" + > revision.getFile().getFilenameWithPath() + "/" + > revision.getRevisionNumber(); > } > > /* (non-Javadoc) > * @see > net.sf.statcvs.output.WebRepositoryIntegration#getDiffUrl > (net.sf.statcvs.model.CvsRevision, > net.sf.statcvs.model.CvsRevision) > */ > public String getDiffUrl(CvsRevision oldRevision, CvsRevision > newRevision) { > return baseURL + "/HEAD/pdiff/" + > newRevision.getFile().getFilenameWithPath() + "/" + > oldRevision.getRevisionNumber() + "/" + > newRevision.getRevisionNumber(); > } > > /* (non-Javadoc) > * @see > net.sf.statcvs.output.WebRepositoryIntegration#setAtticFileNames > (java.util.Set) > */ > public void setAtticFileNames(Set atticFileNames) { > this.atticFileNames = atticFileNames; > } > > } > > -- > Eric Meaney > erm...@gm... > <JcvswebIntegration.java> |