[darcs-users] keeping unusable stuff around
Ganesh Sittampalam
ganesh at earth.li
Wed Oct 26 15:35:22 UTC 2005
On Wed, 26 Oct 2005, Albert Reiner wrote:
> Now I have spent (far too much!) time modifying C1 so as to
> investigate the effects of some change to the underlying theory, and
> this has turned out not to be usable. It has resulted in numerous
> changes all over C1, and now I want to go back to the old code without
> permanently loosing all the modifications I made.
I just keep around the old repository when this happens. Is this a problem
for you? There are various measures you can take to reduce the disk space
it'll use:
- 'darcs optimize --relink --sibling=foo' will hard link the patch files
representing common history with foo to those in foo
- deleting the entire working directory except _darcs, and the contents
of _darcs/current. Make sure you have no local changes first. You can
restore them using 'darcs repair' followed by 'darcs revert -a' (Someone
correct me if this is "unsupported" and likely to lead to tears later..)
> - Record and rollback. This way the useless code is in the repo and I
> can go back to it later. But will this negatively affect patch
> commutation? The changes are all over the place, so there might
> easily arise additional conflicts when patches are commuted past the
> patch and its inverse. Or is darcs smart enough to know that a
> sequence of patch and its inverse are just an identity operation?
darcs isn't yet smart enough for this, although there are some hopes of
making it so in future. I think even if it was, having these dead changes
cluttering up history isn't such a good idea, though that's mainly a
matter of aesthetics.
> - Tag the old version of C1, record the changes, use |send| to make a
> patchbundle that is then simply stored in the D branch, and unrecord
> the changes in C1. This seems nicer to me, but I am not sure it is
> a good idea. In particular, is the patchbundle produced by `darcs
> send` suitable for storing random patches in the long run, or is it
> liable to change?
Recording a patch bundle in version control itself seems a little ugly to
me when there are alternatives, but I can't see any fundamental problem
with this.
Cheers,
Ganesh
More information about the darcs-users
mailing list