[darcs-users] Suggestion: track patch origin metadata

Juliusz Chroboczek jch at pps.jussieu.fr
Sat Oct 23 17:59:17 UTC 2004


> Probably directly in
> _darcs/, something like _darcs/origins/, where we could have a file for
> each patch indicating its "origin" status.

Hmm... I don't like this idea because it breaks the equivalence
between clones.  It would mean that committing on my laptop and
pushing to my main machine and committing on the latter are no longer
equivalent.  (I'd call this property referential transparency.)

Some time ago, I suggested what I feel is a better solution to the
problem: having each repository have a ``level'', and not allowing
patches to increase in level.  So you've got

  stable/_darcs/level: 1
  unstable/_darcs/level: 0

and every patch that gets recorded in unstable gets a level of 0.  A
repository with a level of 1 won't accept a patch with level lower
than 1 without a --force flag.

For full generality, the level should be a list of integers, and
levels are compared pointwise.

I might be wrong, but my gut feeling is that the level scheme solves
the same problems without breaking referential transparency.

                                        Juliusz

                           
  




More information about the darcs-users mailing list