Daniel Shahaf <danie...@apache.org> writes: >> - # note the current time to use it as peg revision date. >> - current_time = time.strftime("%Y-%m-%dT%H:%M:%S") >> + exit_code, output, errput = svntest.main.run_svn(None, 'propget', >> 'svn:date', >> + '--revprop', '-r1', >> + '--strict', >> + sbox.repo_url) >> + if exit_code or errput != [] or len(output) != 1: >> + raise svntest.Failure("svn:date propget failed") >> + r1_time = output[0]
> This tests updating to a {time} equal to the svn:date property, shouldn't it > try updating to a slightly later time to test that resolution works in the > common case too? I thought about that. Commit times are not limited by the filesystem timestamp resolution so svn:date will always have sub-second resolution, however Python 2.5 appears to be a bit limited when converting sub-second times to/from strings as datetime doesn't have %f. There is a 1.1 second sleep between r1 and r2 and we want to construct a date that is strictly after the r1 svn:date and strictly before the r2 svn:date. How do we do something like the following without %f support? fmt = "%Y-%m-%dT%H:%M:%S.%fZ" r1_dt = datetime.datetime.strptime(r1_time, fmt) still_r1_time = (r1_dt + datetime.timedelta(seconds=1)).strftime(fmt) If we do have %f we could probably use a shorter sleep and a smaller delta. -- Philip Martin | Subversion Committer WANdisco | Non-Stop Data www.wandisco.com