package com.perforce.cvs.parser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public enum RcsSchema { UNKNOWN("unknown", RcsSchemaType.STRING), // 'admin' block [1:required] HEAD("head", RcsSchemaType.NUM), BRANCH("branch", RcsSchemaType.NUM), ACCESS("access", RcsSchemaType.STRING), SYMBOLS("symbols", RcsSchemaType.TAGS), LOCKS("locks", RcsSchemaType.TAGS), STRICT("strict", RcsSchemaType.EMPTY), COMMENT("comment", RcsSchemaType.STRING), EXPAND("expand", RcsSchemaType.STRING), // 'delta' block [n:optional] ID("id", RcsSchemaType.NUM), DATE("date", RcsSchemaType.STRING), AUTHOR("author", RcsSchemaType.STRING), STATE("state", RcsSchemaType.STRING), BRANCHES("branches", RcsSchemaType.NUMS), NEXT("next", RcsSchemaType.NUM), // extended COMMITID("commitid", RcsSchemaType.STRING), DELTATYPE("deltatype", RcsSchemaType.STRING), PERMISSIONS("permissions", RcsSchemaType.STRING), KOPT("kopt", RcsSchemaType.STRING), FILENAME("filename", RcsSchemaType.STRING), // 'desc' block [1:required] DESC("desc", RcsSchemaType.STRING), // 'deltatext' block [n:optional] LOG("log", RcsSchemaType.STRING), TEXT("text", RcsSchemaType.BLOCK); String name; final RcsSchemaType tag; RcsSchema(String n, RcsSchemaType t) { tag = t; name = n; } public String getName() { return name; } public void setName(String n) { name = n; } public RcsSchemaType getTag() { return tag; } public static RcsSchema parse(String type) { if (type != null) { for (RcsSchema t : RcsSchema.values()) { if (type.equalsIgnoreCase(t.getName())) { return t; } } if (type.startsWith("comment")) { return RcsSchema.COMMENT; } } Logger logger = LoggerFactory.getLogger(RcsSchema.class); logger.info("Unknown RCS type: " + type); RcsSchema unknown = RcsSchema.UNKNOWN; unknown.setName(type); return unknown; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 13876 | Paul Allen | Rename/move file(s) | ||
//guest/paul_allen/p4convert-maven/src/com/perforce/cvs/parser/RcsSchema.java | |||||
#1 | 13873 | Paul Allen | Branching using p4convert-maven | ||
//guest/perforce_software/p4convert/src/com/perforce/cvs/parser/RcsSchema.java | |||||
#2 | 10919 | Paul Allen |
CVS parse detection of 'comment' in RCS header. - Includes test case 049 parse-comment |
||
#1 | 9807 | Paul Allen | Initial import of p4-convert (from change 894340) |