Support for Windows Usernames
| Newsgroups | gmane.comp.horde.chora |
|---|---|
| Message-ID | <[email protected]> |
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 -- Chora mailing list - Join the hunt: http://horde.org/bounties/#chora Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]
Author-win32.diff
(text/plain, 949 B)
--- 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];