[MERGE REQUEST] revision accessor test case and timestamp fix

Martin Pool mbp at sourcefrog.net
Tue Mar 28 10:15:33 BST 2006


On 28 Mar 2006, Jamie Wilkinson <jaq at spacepants.org> wrote:
> I posted this to the list a few months ago, it must've gotten lost :)  Still
> looking for review and merge.

Sorry it got lost. 

> revno: 1601
> committer: Jamie Wilkinson <jaq at spacepants.org>
> branch nick: bzr.jaq
> timestamp: Mon 2006-03-27 23:52:15 +1100
> message:
>   don't cast commit timestamp to long, which loses precision
> ------------------------------------------------------------
> revno: 1600
> committer: Jamie Wilkinson <jaq at spacepants.org>
> branch nick: bzr.jaq
> timestamp: Mon 2006-03-27 23:44:47 +1100
> message:
>   test that revision accessors act idempotently

If we don't cast it to long, then we need to commit to keep all of the
precision in all storage formats.  In particular if the times are
represented as decimals we need to be quite careful about how they're
written in and out.  I'm a little surprised that this test actually
passes at the moment - perhaps the default %f format for doubles writes
enough digits to make them precise?  At any rate it should be
specifically tested -- this test may fail intermittently if it happens
to run at a time that's not correctly round-tripped.

I don't mind removing the cast if it will work properly.

-- 
Martin




More information about the bazaar mailing list