Part of bzrlib
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 67 | Function | gen_file_id | Return new file id for the basename 'name'. |
| 88 | Function | gen_root_id | Return a new tree-root file id. |
| 93 | Function | gen_revision_id | Return new revision-id. |
| 43 | Function | _next_id_suffix | Create a new file id suffix that is reasonably unique. |
On the first call we combine the current time with 64 bits of randomness to give a highly probably globally unique number. Then each call in the same process adds 1 to a serial number we append to that unique value.
The uniqueness is supplied from _next_id_suffix.
| Parameters | username | This is the value returned by config.username(), which is typically a real name, followed by an email address. If found, we will use just the email address portion. Otherwise we flatten the real name, and use that. |
| Returns | A new revision id. | |