[darcs-users] Defining patch types modularly
droundy at abridgegame.org
Wed Mar 31 11:59:11 UTC 2004
Thanks for clarifying what you meant by diff: the diff is a "universal
patch content description" used to allow different types of patches to
commute without knowing what the other patch actually is.
I understand this, but suspect that it is too limiting. I suspect that it
would mean that as far as its commutation behaves, any "special" patch type
would be equivalent to its "diff", which would eliminate most benefits of
having "special" patch types. For example, I don't see how the existing
token replace patch type could be implemented in your scheme. I'm afraid
that the problem of defining a sufficiently general "diff" may be
equivalent to the problem of defining a "complete" set of patch
types--which makes this seem circular.
On Sat, Mar 27, 2004 at 04:04:39PM +0100, Marnix Klooster wrote:
> COMPUTING A PATCH MOVE
> How can such a 'move patch by diff' be computed? We need to compute
> the (1) procedure, (2) scope, and (3) diff of the new patch.
> (1) The new procedure has to be computed using a computation that is
> patch type specific: 'move patch procedure by a given diff'. This move
> can fail (for example if the diff removes a place in the tree that is
> mentioned in the procedure).
Now this is where I'm stuck. How can we update the procedure as a result
of commuting with a diff in a general manner?
For example the following pair of patches
replace foo bar
replace foo bar
How can this be done in your scheme? As I imagine it, the diff of replace
foo bar (assuming this is a one line file) will be (in the first case)
and when you try to move the
by this diff, you'll get a commutation failure. :(
More information about the darcs-users