[darcs-users] Patches are immutable

David Roundy droundy at abridgegame.org
Tue Oct 26 11:17:55 UTC 2004


On Tue, Oct 26, 2004 at 07:49:47AM -0300, Zooko Wilcox-O'Hearn wrote:
> Juliusz:
> 
> Thanks for the good rant.
> 
> 
> On 2004, Oct 24, at 13:03, Juliusz Chroboczek wrote:
> 
> >  (Side note: arguably, with 20/20 hindsight, better notions of patch
> >   identity could be devised -- one could think of using a random
> >   identity, or a hash of the patch contents, as in Monotone.  But that
> >   is not the way Darcs works.)
> 
> It occurs to me that if I use darcs programmatically from another tool, 
> for example the tailor.py script that I currently use, then I'm playing 
> Russian Roulette with darcs's unsafe method of generating unique patch 
> ids.

Well, that's what the time is there for.  If it's something you're
concerned about, just make sure a second passes between each patch you
record.  (or change the patch name)

> Is it too late to change patch ids to be 128-bit random numbers?

Yes.

> Anyway, "rerecord" could be implemented by generating the inverse of 
> the old patch and then generating a new patch with a new id.  That 
> would provide the convenient user interface without the danger of two 
> patches with the same name.

Rerecord does create a new patch with a new name (different time).
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list