Issue 74 darcs copy

Title darcs copy
Priority feature Status wont-fix
Milestone Resolved in
Superseder Nosy List clive, darcs-devel, dmitry.kurochkin, ganesh, kowey, rgm, thorkilnaur, tommy
Assigned To

Created on 2005-12-27.19:27:53 by clive, last changed 2012-07-12.16:24:19 by rgm.

msg275 (view) Author: clive Date: 2005-12-27.19:27:52
'darcs copy' is like 'darcs move' but results in 2 files with the same patch

I have a large source file that is now too large to manage.  I wish to split it
into 2 'subfiles' that retain the origional history as they will both simply be
the origional large file, each with opposite halves of code removed.  I don't
want to have to be forced to choose which file should lose it's history.
msg278 (view) Author: droundy Date: 2005-12-28.18:06:57
On Tue, Dec 27, 2005 at 07:27:54PM +0000, Clive Crous wrote:
> 'darcs copy' is like 'darcs move' but results in 2 files with the same
> patch ancestory.

Unfortunately, this is quite tricky given the way darcs works, specifically
with regard to the invertibility of patches.  One could of course make a
darcs copy that is invertible, but it's hard to see how such a patch would
commute usefully with other patches.

I think that most likely an easier patch type would be a "split" patch,
which splits a file into two parts with no overlap.  It would still be
tricky, but would also be moderately straightforward.  It's closely related
to the "hunk move" patch idea, which would move a chunk of text from one
location to another within a given file.  One could achieve a "split" patch
by allowing a more general inter-file hunk move, which would be cool, but
would also be much harder to create a simple user interface for.  But then,
the interfile hunk move would allow you to maintain the history of a given
function even if it's moved from one file to another, so you'd potentially
gain a lot more than you do with the copy.

Even just the "simple" file split patch type would allow you to support
both file splitting and file joining operations.

In other words, this is a very interesting idea, but right now isn't the
time for it (or at least for me to work on it), and it requires some
David Roundy
msg374 (view) Author: kowey Date: 2006-01-14.09:41:13
Just for reference, here is an older discussion on RT

Date User Action Args
2005-12-27 19:27:53clivecreate
2005-12-27 20:46:54ganeshsetnosy: + ganesh
2005-12-28 18:06:58droundysetstatus: unread -> unknown
nosy: droundy, tommy, clive, ganesh
messages: + msg278
2006-01-14 09:41:14koweysetnosy: + kowey
messages: + msg374
2006-04-07 22:58:54jchsetstatus: unknown -> wont-fix
nosy: droundy, tommy, kowey, clive, ganesh
2009-08-06 17:45:21adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, dagit, mornfall, simon, beschmi, thorkilnaur, - droundy, clive, ganesh
2009-08-06 20:47:41adminsetnosy: - beschmi
2009-08-10 22:18:09adminsetnosy: + ganesh, clive, - markstos, darcs-devel, zooko, jast, dagit, Serware, mornfall
2009-08-25 17:57:27adminsetnosy: + darcs-devel, - simon
2009-08-27 13:47:01adminsetnosy: tommy, kowey, darcs-devel, clive, ganesh, thorkilnaur, dmitry.kurochkin
2012-07-12 16:24:19rgmsetnosy: + rgm