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

Re: getRevision, accidentally "sent" that last message too soon.

From: Jennifer Bevan <jen_at_alouysius.net>
Date: 2005-01-11 22:03:24 CET

Hmmm. I might not be being clear. On the command line, I can put
in dates using an allowed format using -r { datestring }. What I'm
having a problem with is programmatically using
SVNRevision.getRevision(datestring), which reads in a SHORT/SHORT
format string. svnClientAdapter then, when I create a log command
using the SVNRevision instance, creates a command using
SVNRevision.toString(), which creates a datestring that is not parseable
by svn. By asking the logCommand to print its command, I get:

log -r {Wed, 5 Jan 2005 14:00:00 -0800}:{Wed, 5 Jan 2005 22:00:00 -0800}
http://dav.cse.ucsc.edu/svn/hello/trunk --xml -v --username tester
--password ******* --non-interactive

Notice that these generated time strings are not one of the formats that
the svn book accepts, and indeed my error is:
-------------------------------
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)
------------------------------

So...now that I don't have to worry about the timezone issue, I can
certainly make
a patch for this. But right now I have to head out so I'll get that to
you later tonight.

-Jen

Mark Phippard wrote:

>Right. I would think you just need to get a valid string for one of the
>specified formats. Notice in the commands that you have to surround the
>date with double-quotes if you use a format that has spaces in it. Plus,
>you always need the curly braces { }.
>
>Mark
>
>Jennifer Bevan <jen@alouysius.net> wrote on 01/11/2005 03:52:51 PM:
>
>
>
>>Right...that's what I looked at when comparing what svnClientAdapter
>>sent to the log command with what should have been acceptable.
>>Once I found a format that SVNRevision.getRevision() would parse,
>>it sent out the log command mentioned in the previous email, which
>>caused the error. I don't know why Date.toString() creates an
>>
>>
>unparseable
>
>
>>string without an explicitly-specified format string, but it does, and
>>
>>
>that
>
>
>>is what SVNRevision.toString() is using.
>>
>>So...it sounds like I don't need to get a timezone specified into
>>svnClientAdapter
>>because svn will also assume local time, and actually convert...so
>>
>>
>therefore
>
>
>>the only problem is the toString() issue?
>>
>>-Jennifer Bevan
>>
>>
>>Mark Phippard wrote:
>>
>>
>>
>>>So it sounds like you are trying to use dates for revisions in svn
>>>commands? This doc portion seems to show the acceptable formats:
>>>
>>>http://svnbook.red-bean.com/en/1.1/ch03s03.html#svn-ch-3-sect-3.3
>>>
>>>If you use a format that does not specify a timezone, then it assumes
>>>
>>>
>you
>
>
>>>have entered the time based on the local timezone and does the convert
>>>
>>>
>to
>
>
>>>GMT for you.
>>>
>>>Mark
>>>
>>>
>
>
>_____________________________________________________________________________
>Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
>_____________________________________________________________________________
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
>For additional commands, e-mail: dev-help@subclipse.tigris.org
>
>
>
>
Received on Wed Jan 12 08:03:24 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.