[darcs-users] rollback should apply inverse patch to current as well.
adam at megacz.com
Sat May 8 00:35:05 UTC 2004
David Brown <darcs at davidb.org> writes:
> As I understand it, rollback, and unrecord do not back out the changes
> in the working directory.
This makes sense for unrecord, since you're deleting the patch.
However, in the case of rollback, you're actually *applying* a patch
Aside from this one command (rollback), darcs has the nice invariant
that all patches applied to the repository have also been applied to
the working directory, no matter what (of course the opposite is not
true, otherwise 'darcs record' would be pointless).
I kinda assumed this was a basic rule-of-darcs, but I guess it's not
Also, this begs another question: if a patch has been applied to the
repo but not to the working directory, how do you make darcs apply it
to the working directory? Pull it from yourself?
So, I'd suggest either mentioning this in the documentation (note:
rollback is the only way to wind up with a patch in the repo which
hasn't been applied to current) or else have rollback apply the
inverse patch to the working directory too, and then we could list
this invariant in the documentation, which would help people
understand the relationship between the repo and working directory.
More information about the darcs-users