monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] unique repository ids


From: Nathan Myers
Subject: [Monotone-devel] unique repository ids
Date: Mon, 6 Dec 2004 14:39:18 -0800
User-agent: Mutt/1.3.28i

On Mon, Dec 06, 2004 at 09:54:57PM +0000, Tim Woodall wrote:
> 
> I solved this as follows: every database had a unique ID. Monotone can't
> do this AFAICT because you can clone a database with cp. For my design
> whether you created the db with dcvs init or cloned an existing db with
> dcvs clone your new db would always get a unique ID (baring collisions
> reading 16 bytes from /dev/random)

The repository ID can be the hash of all hashes in the repository, 
computed in any order that's repeatable for a given state of the 
repository.  Two identical repositories *are* the same repository.  
Two distinct repositories could become identical by syncing.  By 
definition there can be no conflicts between identical repositories, 
so nothing you would need them to be distinct for would ever come up.
(All empty repositories have the same ID; I suppose you would salt 
it so it's distinct from the hash for the empty file.)

How often would one need a repository ID?  It would be expensive to 
keep up to date, but not prohibitively expensive to compute now and 
again.

Nathan Myers
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]