Part of bzrlib
Function | gen_file_id | Return new file id for the basename 'name'. |
Function | gen_root_id | Return a new tree-root file id. |
Function | gen_revision_id | Return new revision-id. |
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 | The username of the committer, in the format returned by config.username(). This 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. |