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

Reply via email to