1

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));
4

1 回答 1

1

只是为了澄清问题-您是说 SvnRevisionRange 对象的时间属性与最初传入的值不一致?

如果是这样,此测试将失败:

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");

将上面的代码作为单元测试运行并发布结果...

于 2013-06-21T18:36:55.233 回答