package com.perforce.svn.process; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.perforce.common.node.Action; import com.perforce.svn.change.ChangeMap; import com.perforce.svn.history.ChangeAction; import com.perforce.svn.query.QueryInterface; public class MergeSource { private Logger logger = LoggerFactory.getLogger(MergeSource.class); private long startFromSvnRev; private long endFromSvnRev; private String fromPath; private ChangeAction fromNode; private Action mergeAction; public MergeSource(String path, long startChange, long endChange) { this.fromPath = path; this.startFromSvnRev = startChange; this.endFromSvnRev = endChange; } public boolean fetchNode(QueryInterface query) throws Exception { ChangeAction node = query.findLastAction(fromPath, endFromSvnRev); if (node != null && node.getAction() != Action.REMOVE) { if (logger.isDebugEnabled()) { String md5 = node.getMd5(); logger.debug("\tmerge source: Node: " + node.toString()); logger.debug("\tmerge source: MD5: " + md5); } fromNode = node; fromNode.setStartChange(startFromSvnRev); return true; } fromNode = node; return false; } public ChangeAction getFromNode() { return fromNode; } public void setFromNode(ChangeAction from) { fromNode = from; } public long getStartFromChange() { return ChangeMap.getChange((int) startFromSvnRev); } public long getEndFromChange() { return ChangeMap.getChange((int) endFromSvnRev); } public long getStartFromSvnRev() { return startFromSvnRev; } public long getEndFromSvnRev() { return endFromSvnRev; } public String getFromPath() { return fromPath; } public Action getMergeAction() { return mergeAction; } public void setMergeAction(Action how) { mergeAction = how; } public String toString() { StringBuffer sb = new StringBuffer(); sb.append(fromPath + " r" + startFromSvnRev + "-" + endFromSvnRev + ": " + mergeAction); return sb.toString(); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 13876 | Paul Allen | Rename/move file(s) | ||
//guest/paul_allen/p4convert-maven/src/com/perforce/svn/process/MergeSource.java | |||||
#1 | 13873 | Paul Allen | Branching using p4convert-maven | ||
//guest/perforce_software/p4convert/src/com/perforce/svn/process/MergeSource.java | |||||
#3 | 13776 | Paul Allen |
CVS: Update to node Action detection. The RCS State is normally set to 'Exp' and 'dead', but this change allows more user defined states. - Move Action class to common.node package. - Modified test case061 to test custom states. |
||
#2 | 11263 | Paul Allen | Refactor the enum Action outside of ChangeAction. | ||
#1 | 9807 | Paul Allen | Initial import of p4-convert (from change 894340) |