Hi Dmitry,

Thanks! That was fast! I will try the SVNPropertyValue approach.
I thought of the SVNLog based approach, but gave it up do to the potential
performance problems.

Regards,
Aravinda


On Tue, Jul 23, 2013 at 3:20 PM, Dmitry Pavlenko <pavle...@tmatesoft.com>wrote:

> Hello Aravinda,
>
> You can get value of svn:date revision property using
> SVNRepository#getRevisionPropertyValue method:
>
> SVNPropertyValue propertyValue =
> svnRepository.getRevisionPropertyValue(revision,
> SVNRevisionProperty.DATE);
> String stringValue = SVNPropertyValue.getPropertyAsString(propertyValue);
> SVNDate date = SVNDate.parseDate(stringValue);
> long timeInMicroSeconds = date.getTimeInMicros();
>
> Alternatively (but maybe this will be a bit slower), you can call
> SVNRepository#log on that revision
> and call getDate() on SVNLogEntry obtained. This will require additional
> efforts from the server
> side, but if you need some other information about that revision, reported
> by SVNLogEntry, you can
> use this method.
>
> --
> Dmitry Pavlenko,
> TMate Software,
> http://subgit.com/ - git-svn bridge
>
> > Hi all,
> >
> > I need to get the time-stamp corresponding to a revision number. What is
> > the best way to do this conversion (revision number -> time-stamp)?
> >
> > Cheers,
> > Aravinda
>



-- 
Aravinda Dassanayake
www.virtusa.com

Voice - +1 614 339 9988
IM      - aravinda777
Blog   - http://aravindad.blogspot.com

Reply via email to