Anthill OS patch: svn-noauthor-tags
Jim Hague <[email protected]> Mon, 29 Oct 2007 11:41:23 +0000
| Newsgroups | gmane.comp.java.anthill.devel |
|---|---|
| Message-ID | <[email protected]> |
# HG changeset patch # User Jim Hague <jim.hague-70XMh/ZFPwTe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> # Date 1193654689 0 # Node ID 1b81fccfec8bab44a3c00e527a2da1327f28d63d # Parent 6362c184dbe5d5ce1c7aba995ccdc596d6151ad5 The Subversion author name may be '(no author)' if doing anonymous write access via Apache. Adjust regular expression to cope. Thanks Philip [email protected] diff -r 6362c184dbe5 -r 1b81fccfec8b source/main/java/com/urbancode/anthill/adapter/SubversionRepositoryAdapter.java --- a/source/main/java/com/urbancode/anthill/adapter/SubversionRepositoryAdapter.java Mon Oct 29 10:44:49 2007 +0000 +++ b/source/main/java/com/urbancode/anthill/adapter/SubversionRepositoryAdapter.java Mon Oct 29 10:44:49 2007 +0000 @@ -314,11 +314,13 @@ public class SubversionRepositoryAdapter try { - headerRE = new RE("^r(\\d+) \\| ([^\\|]+) \\| ([^\\(]+)"); - - // line starting with 3 spaces and then an A,D,M, or R followed by - // '/' or '\' and a bunch of non spaces (a path). - fileRE = new RE("^ ([ADMR]) [/\\\\](\\S+)"); + // Note that the username may be '(no author)'. See + // Subversion FAQ. + headerRE = new RE("^r(\\d+) \\| (.+?) \\| ([^\\(]+)"); + + // line starting with 3 spaces and then an A,D,M, or R followed by + // '/' or '\' and a bunch of non spaces (a path). + fileRE = new RE("^ ([ADMR]) [/\\\\](\\S+)"); } catch (RESyntaxException rse) { @@ -429,7 +431,6 @@ public class SubversionRepositoryAdapter * @param file file to prepare for editing */ public void prepareFileForEdit(String file) throws RepositoryException { - // intentionally left blank. } /** @@ -446,8 +447,8 @@ public class SubversionRepositoryAdapter throw (new RepositoryException("No label specified")); } - tag = tag.replace('$', '_').replace(',', '_'). - replace(':', '_').replace(';', '_'); + tag = tag.replace('$', '_').replace(',', '_').replace('.', '_') + .replace(':', '_').replace(';', '_').replace('@', '_'); log.info("Tagging entire project with label: " + tag); -- Jim Hague - [email protected] Never trust a computer you can't lift.