package com.perforce.common.node; public class NodeHelper { /** * Used to re-map the source and target path for each file when branching * directories. Compares paths in lower case, BUT returns in the original * case formatting * * @param from * @param to * @param path * @return */ public static String remap(String from, String to, String path) { if (from == null || from.isEmpty()) { return to + "/" + path; } else if (path.toLowerCase().startsWith(from.toLowerCase())) { return to + path.substring(from.length()); } else { return null; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 13876 | Paul Allen | Rename/move file(s) | ||
//guest/paul_allen/p4convert-maven/src/com/perforce/common/node/NodeHelper.java | |||||
#1 | 13873 | Paul Allen | Branching using p4convert-maven | ||
//guest/perforce_software/p4convert/src/com/perforce/common/node/NodeHelper.java | |||||
#1 | 11066 | Paul Allen |
Code refactor: Moved 'node' package from 'svn' to 'common'. |
||
//guest/perforce_software/p4convert/src/com/perforce/svn/node/NodeHelper.java | |||||
#1 | 9807 | Paul Allen | Initial import of p4-convert (from change 894340) |