[merge] 1ms resolution for commit timestamps

John Arbash Meinel john at arbash-meinel.com
Tue Jul 18 20:11:24 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When creating a new commit, it is possible to specify the timestamp to
use. The old code used to explicitly restrict this to 1s precision.
While timestamps that were generated were preserved at something like
nanosecond precision. (depended mostly on what a double() could hold, at
16 digits of precision, there are 9 digits before the decimal, so it
should be something like 7 digits afterwards, or 100ns resolution).

Anyway, 1ns is a little excessive, especially because we don't actually
have that much precision, but restricting it to 1s was also too limiting.

So the attached patch changes it so that whether the timestamp is
generated or supplied, it is restricted to 1ms resolution. That way,
multiple commits within a second can be preserved. It seems a reasonable
resolution to use.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvTJcJdeBCYSNAAMRAhHGAJ4vdYpGB4w7rXCRJHFSuqDxZO1rXACfZKox
5p+tlNOPucV9ndZ9qhClDhk=
=NJOZ
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: one-ms-timestamp.patch
Type: text/x-patch
Size: 2462 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060718/4828300c/attachment.bin 


More information about the bazaar mailing list