Pergunta

When creating a SvnRevisionRange, range.StartRevision.Time decreases 5 hours to the date time provided. So when getting the log it doesn't retrieve the correct logs since the time is not passed correctly. Can anyone help? SharpSvn version is 1.6017.1920.11722 in .net 3.5

DateTime startDateTime = dtStart.DateTime.Date;
DateTime endDateTime = dtEnd.DateTime.Date.AddHours(23).AddMinutes(59).AddSeconds(59);

SvnRevisionRange range = new SvnRevisionRange(new SvnRevision(startDateTime), new SvnRevision(endDateTime));
Foi útil?

Solução

Just to clarify the question-- you're saying that the time properties of the SvnRevisionRange object are inconsistent with the values originally passed in?

If so, this test would fail:

DateTime startDateTime = DateTime.UtcNow.AddDays(-1);
DateTime endDateTime = DateTime.UtcNow;

SvnRevisionRange range = new SvnRevisionRange(new SvnRevision(startDateTime), new SvnRevision(endDateTime));

Assert.AreEqual(startDateTime, range.StartRevision.Time, "The start times are not equal");
Assert.AreEqual(endDateTime, range.EndRevision.Time, "The end times are not equal");

Run the code above as a unit test and post the results...

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top