darcs

Issue 989 hunk edition in record

Title hunk edition in record
Priority wishlist Status duplicate
Milestone Resolved in
Superseder darcs record interactive option: "e" is for "edit"
View: 291
Nosy List darcs-devel, dmitry.kurochkin, galbolle, jaredj, kowey, thorkilnaur, tommy
Assigned To
Topics ProbablyEasy, UI

Created on 2008-08-12.15:09:40 by galbolle, last changed 2009-08-27.14:16:13 by admin.

Messages
msg5405 (view) Author: galbolle Date: 2008-08-12.15:19:21
It would be nice to be able to manually edit the hunks when recording.

That is, when using darcs record, be able to hit 'e' for edit after each hunk,
and have $EDITOR open with the current hunk. Modify it, save, and darcs record
records that hunk and goes on with the following changes.

Use case:

This would be especially useful when darcs' diff algorithm yields hunks that are
too big. This is most susceptible to be needed when editing include lists. For
example, say you have added FeatureFoo and FeatureBar to your project.

you get the following changes:
addfile FeatureFoo.hs (1)
hunk FeatureFoo.hs [...](2)
addfile FeatureFoo.hs (3)
hunk FeatureFoo.hs [...] (4)
hunk Main.hs 42
+ import FeatureFoo
+ imoport FeatureBar (5)

One would like to record changes 1-2 and the first line of 5 together, and 3 4
and the second line of 5 together. In that case, one needs to manually split 5,
which would be allowed by the 'e' key.
msg5406 (view) Author: kowey Date: 2008-08-12.15:22:02
Bonjour Florent,

This is something that others have asked for.  It does sound like an interesting
feature.  Adding you to issue291
msg5407 (view) Author: galbolle Date: 2008-08-12.15:38:28
I don't think this is a duplicate of 291, since what I propose to be able to
edit is the hunk itself, not the file. I guess the two are close but
not-quite-identical, and they conflict for the use of the 'e' key in record's ui.

While I agree that editing the file could be more intuitive, editing the hunk
allows one some more tricks such as hunk-splitting. Moreover, editing the file
can already be done via amend-record, but not editing the hunk. Last, editing
the hunk would not change the working directory, while editing the file would
change it, so they have different use-cases.

Aside: I'm not sure about the etiquette for requesting de-duplication of bugs,
but I feel this is different of issue 291. Should I comment on bug 291,
de-duplicate, or continue the discussion here while keeping a link ?
msg5409 (view) Author: kowey Date: 2008-08-12.15:46:54
Nicely argued!  But now I think it's a duplicate of yet another bug (which I
think you just spotted)

As for etiquette, I would like to encourage a culture of boldness on the bug
tracker.  For example, here, you very clearly and politely argued for the
de-duplication, so I doubt anybody would have been annoyed if you had just
flipped the status to something else.
msg5410 (view) Author: kowey Date: 2008-08-12.15:49:19
Argh, I just realised that I gave you a completely useless etiquette answer. 
I'm not sure what the best approach would have been.  I think replying to the
current bug regarding the de-duplication made sense.
History
Date User Action Args
2008-08-12 15:09:40galbollecreate
2008-08-12 15:19:29galbollesetstatus: unread -> unknown
nosy: tommy, beschmi, kowey, dagit, jaredj, galbolle
messages: + msg5405
2008-08-12 15:22:13koweysetstatus: unknown -> duplicate
nosy: tommy, beschmi, kowey, dagit, jaredj, galbolle
superseder: + darcs record interactive option: "e" is for "edit"
messages: + msg5406
2008-08-12 15:38:37galbollesetnosy: tommy, beschmi, kowey, dagit, jaredj, galbolle
messages: + msg5407
2008-08-12 15:44:31galbollesetnosy: tommy, beschmi, kowey, dagit, jaredj, galbolle
superseder: + wish: ablity to split and otherwise record a hunk in record
2008-08-12 15:47:03koweysetnosy: tommy, beschmi, kowey, dagit, jaredj, galbolle
superseder: - darcs record interactive option: "e" is for "edit"
messages: + msg5409
2008-08-12 15:49:29koweysetnosy: tommy, beschmi, kowey, dagit, jaredj, galbolle
messages: + msg5410
2009-03-22 21:13:00koweysetnosy: + dmitry.kurochkin, simon, thorkilnaur
superseder: + darcs record interactive option: "e" is for "edit", - wish: ablity to split and otherwise record a hunk in record
2009-08-06 21:10:38adminsetnosy: - beschmi
2009-08-11 00:20:07adminsetnosy: - dagit
2009-08-25 17:42:22adminsetnosy: + darcs-devel, - simon
2009-08-27 14:16:13adminsetnosy: tommy, kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, galbolle