[darcs-users] How do disable "do you want to push these patches"?
Ben Franksen
ben.franksen at online.de
Wed Mar 9 02:38:55 UTC 2016
Ganesh Sittampalam wrote:
> On 07/03/2016 22:57, Evan Laforge wrote:
>> On Mon, Mar 7, 2016 at 12:56 PM, Ganesh Sittampalam <ganesh at earth.li>
>> wrote:
>> Actually I've always thought that rather than edit hunks, I'd prefer a
>> feature to quit the record but save the answers until now. Then I can
>> edit it in vim normally, not in the confusing diff display, and
>> rerecord with a replay up to that point. With a bit of editor
>> integration, I could replace the hunk display with telling the editor
>> to jump there. Then I get full context and I can edit as I see fit,
>> and hit a button to restart and replay the record if I made a change.
>> This would also solve the problem where you make a change in the hunk
>> editor but now you can't test it or go out of the hunk bounds and then
>> when you record you've got to either make the same change in the file
>> or revert to the new version, and then your editor hassles you about
>> how the file changed and offers to destroy any unsaved local changes,
>> etc.
>>
>> But that's nontrivial and I'm sure is in "patches welcome" territory.
>
> Interesting idea - one difficulty I see is how you save the answers. If
> you do it positionally, then any subsequent edits to the source tree
> would make them invalid. Doing it textually would make the whole thing
> pretty big.
I think a good approach here would be to mimic git's staging area. Some
persistent place in the repo where e.g. an interrupted record stores the
already decided changes. Perhaps a switch --continue or even an interactive
solution ("resume last interrupted record? [yn]"). It should be possible to
say "s" ("store selection") when the last regrets question is asked.
> More sophisticated interactive selection is definitely interesting in
> general. One thing I'd like to see is a graphical interface (e.g.
> integrated with darcsden). A nicely done interface could make it easy to
> record multiple patches and revert some hunks simultaneously, which is
> often something I find myself wanting when doing a big record.
Not sure if a GUI is the way to go (other than for darcsden I mean). IMO
interactive patch selection in darcs could be vastly improved by adding a
pair of "undo/redo" command keys. (The existing "k" can exhibit rather
surprising behavior, which is why I almost never use it.)
Another point on my wish list in particular for hunk selection is a command
key to display the hunk under consideration with context, like in diff -u.
The normal darcs way to display changes is a good default but sometimes
there are many similar or identical lines or hunks in the file; this is when
context could be extremely helpful. Bonus points for making the number of
context lines configurable, ideally also during the interactive selection
(perhaps using +/- keys to increase/decrease context size).
> FWIW when I searched briefly I came across this post where Ben Franksen
> expresses fairly similar opinions/ideas to yours:
> http://lists.osuosl.org/pipermail/darcs-users/2013-July/026900.html
Thanks for mentioning it, I had forgotten half of it.
Cheers
Ben
--
"Make it so they have to reboot after every typo." ― Scott Adams
More information about the darcs-users
mailing list