[chora] Support for Windows Usernames

GPHemsley at aol.com GPHemsley at aol.com
Wed Feb 4 14:20:51 PST 2004


I'd sent this sometime last week, but I got no response at all.... Maybe it 
was because of the forwarding and such, but I don't know. Original message 
follows:

----------------------------------------------------------------------------

As you may or may not know, CVS usernames on Windows platforms take the form 
of the current user (at least, some of them do). If the Windows username has a 
space in it, this causes problems with Chora, in regards to the regexp to 
determine all of the file/revision information.

I am aware of the fact that the files mentioned are no longer included in the 
latest CVS version, but I could not find the place they were moved to, so I 
just used the latest stable download. I am attaching a patch that was created 
on mingw32 using 'diff -u', but has the path names from my computer in it.

Gordon Hemsley
-------------- next part --------------
--- C:\Documents and Settings\Gordon Hemsley\Local Settings\Temp\chora-1.2\lib\CVSLib\Log.php	Mon Dec 16 20:42:27 2002
+++ D:\Program Files\Apache Group\Apache\htdocs\horde\chora\lib\CVSLib\Log.php	Thu Jan 29 21:49:59 2004
@@ -44,7 +44,7 @@
             /* Found revision and filename, now looking for date */
             case CVSLIB_LOG_DATE:
                 $line = array_shift($raw);
-                if (preg_match("|^date:\s+(\d+)[-/](\d+)[-/](\d+)\s+(\d+):(\d+):(\d+).*?;\s+author:\s+(\S+);\s+state:\s+(\S+);(\s+lines:\s+([0-9\s+-]+))?|", $line, $parts)) {
+                if (preg_match("|^date:\s+(\d+)[-/](\d+)[-/](\d+)\s+(\d+):(\d+):(\d+).*?;\s+author:\s+(\S.*?);\s+state:\s+(\S+);(\s+lines:\s+([0-9\s+-]+))?|", $line, $parts)) {
                     $this->date = gmmktime($parts[4], $parts[5], $parts[6], $parts[2], $parts[3], $parts[1]);
                     $this->author = $parts[7];
                     $this->state = $parts[8];


More information about the chora mailing list