Version 2 of Darcs, the feel good distributed version control system was released recently. This version includes a new feature that I long awaited for, and almost invented my own version control system for:
The main lesson regarding these new semantics is that patches depends on primitive patches, not on named patches. A named patch is really just a set of primitive patches.
To better understand this feature, consider this example:
- Patch X modifies files A, B, and C.
- Patch Y modifies files A and C.
- You modify file B and want to amend patch X.
Darcs 2 allows this (hurray!) whereas Darcs 1 does not. As a result, you had to go through a fair bit of manual labor to achieve the same effect in Darcs 1:
- Create a temporary branch.
- Unrecord patch Y.
- Amend patch X.
- Push the new patch X.
- Recreate patch Y.
- Finally, push patch Y.