[darcs-users] how to handle moving code around

Michael G Schwern schwern at pobox.com
Wed Mar 30 06:32:58 UTC 2005


On Tue, Mar 29, 2005 at 08:40:37PM -0800, Sean Perry wrote:
> Michael G Schwern wrote:
> >darcs mv A B
> >open B in editor, grab code for A
> >open A in editor, deposit code
> >darcs add A
> >darcs record
> >
> >Now darcs sees the mv and history is maintained.
> 
> I suppose. My current thinking is that a single record showing the 
> pieces being removed from A and added to B should be sufficient.

The advantage of doing the mv, assuming the vast majority of A will be
moved to B, is that the change history of A inherited by B.  So when you,
for example, do a "darcs changes" or "darcs annotate" on B you will get
all the history of that code including the time it was in file A.

By simply cutting and pasting the code you create a historical discontinuty
where the history of the code in B only goes back to the point of the move
at which point if you want to look back further you have to start poking
through A's history.

At least, that's how I think it works.

Anyhow, its a minor thing but as someone who does a lot of code archeology
historical discontinuties are a pain.





More information about the darcs-users mailing list