[darcs-users] how to handle moving code around

Julian Snitow jsnitow at gmail.com
Thu Mar 31 00:08:30 UTC 2005

On Wed, 30 Mar 2005 08:47:16 -0800, Sean Perry <shaleh at speakeasy.net> wrote:
> Shae Matijs Erisson wrote:
>   >
> > Yeah, that's why I occasionally want darcs cp.
> yeah, this makes sense. Conceptually, darcs just needs to clone the file
>   AND all of its patches. Or find some other way for file X to read file
> Y's patches safely. Really shouldn't be too hard.

That sounds like it would be really easy on a file-based VC system,
and harder than it looks on a changeset-based system.  As I understand
it (I could admittedly be wrong), you could usefully use some `darcs
cp' to view annotation/history information for the copied file, but
rollbacks to a previous state would be just that:  an identical copy
of all the files in the repository at a given invocation of `darcs

`darcs cp' as you describe it would effectively do one of two things:
(1) go back in time and mangle past changesets, or (2) record a 'copy'
operation in a patch, allowing correct historical annotation, but
unaltered rollbacks. [Here, number 2 would be the right thing to do].

Call it a hunch, but I wouldn't be surprised if this issue had already
come up on this list aeons ago, and `darcs cp' had been decided
against, for similar reasons.


More information about the darcs-users mailing list