[darcs-users] duplicate patch names in existing repository

David Roundy droundy at abridgegame.org
Thu Aug 19 11:26:02 UTC 2004


On Wed, Aug 18, 2004 at 11:14:25AM -0700, Tupshin Harper wrote:
> It seems that darcs check and darcs repair complain about duplicate 
> patch names in our repo. I was rather surprised that current versions 
> (0.9.23) of darcs think that it is an error to have duplicate patch 
> names, and I  would like to know if there is a strategy to deal with the 
> problem.

It is definitely a real problem.  The problem shows up only when the entire
patch ID is duplicated, so as long as you record less than one patch per
second with the same name, you're safe.  So usually duplicate IDs like this
come about due to a bug in darcs.  Darcs could check for duplicate patch
names when recording, but doesn't, mostly for speed reasons.  Probably it
should at least check the most recent patches, since that wouldn't take
long (and most commonly, unless your clock is stopped, the duplicate ID
will be the most recently recorded patch.

> You can do a partial get from http://darcs.vexi.org/core to see the problem.

Fortunately, it's pretty straightforward to deal with (in a hackish way).
If you edit

_darcs/inventories/20040316022807-5007d-613001a30686b0ce002f866575685af4106ab73a.gz

It's not actually gzipped, so you can edit it easily.  You look for the
lines

[working again even better
adam at megacz.com**20040223021158] 

which are repeated twice, and remove one instance of the two (or were there
three? in any case just leave one).  Then the repo passes darcs check.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list