[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Errors parsing dates and formatting them in SVNRevision

From: Jennifer Bevan <jen_at_alouysius.net>
Date: 2005-01-11 21:16:02 CET

Hi again,
I have another timezone issue, of course. SVNRevision.getRevision
parses dates using DateFormat.SHORT for both time and day,
and the accepted date strings look like "1/5/2005 2:00 PM".
I'd really like to be able to specify seconds. I'd also really like
to be able to specify the time zone, because unless I happen to
know that the subversion repository is in the same timezone
that I am in, I think the getRevision will produce a date using
my local timezone, which may have nothing to do with the
timestamp (date + time + gmt offset) in the repository.

Also, when I do manage to get a date string that getRevision parses,
I get an error (included below). I believe the problem is that the command
line uses "2005-01-05 22:00:00 +0000" -- and okay, yes, I am using an
older version of svn (1.0.9, I'll get around to updating it). So...I
checked
the 1.1 version of the Subversion book and the style below (Date.toString(),
called as the default case in SVNRevision.toString()) is not accepted.
So this part looks like a real error.

------------------------------------------
org.tigris.subversion.svnclientadapter.SVNClientException:
org.tigris.subversion.svnclientadapter.commandline.CmdLineException:
svn: Syntax error in revision argument '{Wed, 5 Jan 2005 14:00:00
-0800}:{Wed, 5 Jan 2005 22:00:00 -0800}'

    at
org.tigris.subversion.svnclientadapter.SVNClientException.wrapException(SVNClientException.java:67)
    at
org.tigris.subversion.svnclientadapter.commandline.CmdLineClientAdapter.getLogMessages(CmdLineClientAdapter.java:351)
    at edu.se.evolution.kenyon.scm.SVN.getAllConfigSpec(SVN.java:129)
    at edu.se.evolution.kenyon.scm.SVN.init(SVN.java:112)
    at edu.se.evolution.kenyon.scm.SVN.<init>(SVN.java:46)
    at edu.se.evolution.kenyon.scm.testing.SVNTest.setUp(SVNTest.java:25)
    at junit.framework.TestCase.runBare(TestCase.java:125)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Caused by:
org.tigris.subversion.svnclientadapter.commandline.CmdLineException:
svn: Syntax error in revision argument '{Wed, 5 Jan 2005 14:00:00
-0800}:{Wed, 5 Jan 2005 22:00:00 -0800}'

    at
org.tigris.subversion.svnclientadapter.commandline.CommandLine.execString(CommandLine.java:115)
    at
org.tigris.subversion.svnclientadapter.commandline.SvnCommandLine.log(SvnCommandLine.java:463)
    at
org.tigris.subversion.svnclientadapter.commandline.CmdLineClientAdapter.getLogMessages(CmdLineClientAdapter.java:348)
    ... 14 more
Received on Wed Jan 12 07:16:02 2005

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.