[bug] different handling of timestamp during commit

Martin Pool mbp at canonical.com
Tue Jul 11 03:30:12 BST 2006


On 10 Jul 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> I had reason to inspect the commit code, and I found this:
> 
>         if timestamp is None:
>             self._timestamp = time.time()
>         else:
>             self._timestamp = long(timestamp)
> 
> We've had this code for a while, but it means that if you commit and
> don't supply a timestamp we preserve accuracy to nanoseconds (the final
> output is %.9f).
> But if you supply a timestamp, it truncates it to 1-second precision.

> But at the very least I would like us to change the code to be
> consistent, either have it be:
> 
>         if timestamp is None:
>             timestamp = time.time()
>         self._timestamp = long(timestamp)

I think we should just do this one - second resolution is reasonable.

Testaments intentionally don't include fractional seconds, so there is
some scope to remove them entirely during a future upgrade.  But for now
just stopping recording them makes sense.

-- 
Martin




More information about the bazaar mailing list