darcs

Issue 1734 ability to revert during record interactive UI

Title ability to revert during record interactive UI
Priority wishlist Status needs-implementation
Milestone Resolved in
Superseder Nosy List beschmi, darcs-devel, dmitry.kurochkin, dsf, kowey, markstos, reinier.lamers, simon, thorkilnaur, tommy, zooko
Assigned To
Topics UI

Created on 2010-01-28.15:33:21 by kowey, last changed 2010-11-15.14:16:17 by dsf.

Messages
msg2872 (view) Author: markstos Date: 2008-01-30.00:13:05
> I wish I could run "darcs push", and then when the interactive mode brings a
> patch to my attention, I could obliterate that patch.  

I vote against this as being unnecessary and uncommon (at least for me). 

> In a similar vein, I wish that I could run "darcs record", and then when the
> interactive mode brings a hunk to my attention, I could revert that hunk.

On the other hand, I have wanted to do this frequently and share this wish. 
In the interactive record menu, "r" (for revert) is conveniently unused. 

It probably merits an extra confirmation as a destructive action.
msg6950 (view) Author: zooko Date: 2008-12-31.17:29:44
MarkStos said this was uncommon (at least for him), but it is common for me.  It
just came up again.

I've done a few days worth of work, and now I want to split the work into
logically separate patches.  For example, the first patch will probably be the
test cases, separate from the changes to the code to make the code pass the new
tests.  So I run "darcs record" and start stepping through the files and hunks
looking for logically related changes that I can put into a single patch (see
also issue126).

Now I find a typo as one of the hunks.  I have to either cancel this "darcs
record" and go run "darcs revert" to destroy the typo, and then resume the
"darcs record" and reselect any hunks that I've already selected, or else I have
to remember that after I'm finished with this "darcs record" then I need to come
back and do a "darcs revert" and then step through the changes until I find this
typo again.

It would be perfect if there were a key I could press -- right now, while I'm in
the middle of a big interactive "darcs record" -- which would revert this typo.
msg6951 (view) Author: markstos Date: 2008-12-31.18:43:19
> Now I find a typo as one of the hunks.  I have to either cancel this "darcs
> record" and go run "darcs revert" to destroy the typo, and then resume the
> "darcs record" and reselect any hunks that I've already selected, or else I have
> to remember that after I'm finished with this "darcs record" then I need to come
> back and do a "darcs revert" and then step through the changes until I find this
> typo again.
> 
> It would be perfect if there were a key I could press -- right now, while I'm in
> the middle of a big interactive "darcs record" -- which would revert this typo.

I haven't re-read what I said before, but I do sometimes run into the same
case.  As I'm recording, I find that I've left some debugging output in the
code. It would be nice to revert the debugging statements while I'm looking at
them during the 'record'.

    Mark
msg8683 (view) Author: kowey Date: 2009-09-04.10:03:54
I think for reverting a hunk when recording, issue291 is good enough albeit not
quite the same.

While I see that is both useful and common, I think it's ultimately in
everybody's best interests if we applied the Keep-It-Simple-Stupid principle here.

We have to manage this delicate balance between being simple and featureful. 
Sometimes there is no trade-off and we can offer both at the same time.

I claim that this is one of those cases where a nice feature adds has an
unacceptable cost in simplicity (UI-wise).  OK, it's just another key-press to
offer, but all these tiny changes add up. Sorry Zooko, I'm going to resist this
change and recommend a wont-fix.  Discussion on darcs-users if you want to
re-open this.
msg9906 (view) Author: kowey Date: 2010-01-28.15:33:17
See issue107

(grumble, feature creep, complain, moan)...

I admit I too have wanted this from time to time.
msg9908 (view) Author: reinier.lamers Date: 2010-01-28.17:09:27
Just let me add that I am strongly against this feature (and all other
of the "I want to X while Y'ing" kind). There's a reason that "darcs
record" is "darcs record" and not "darcs revert". If we build
shortcuts to other darcs commands into the interactive prompts for
commands, that's going to be a huge amount of UI clutter. It also
breaks the property that a record does not change your working copy,
thus making darcs less predictable.

If we really agree that this inability to X while Y'ing is a very
fundamental flaw in darcs, we could redesign the whole UI into an
interactive übershell like Eric proposed, where you go through all the
unrecorded primitive patches and can call any operation upon any one
of them. I'm very skeptical about such a thing, but I'd rather see
that than see record, pull, etc. turning into unprincipled, half-baked
versions of such an übershell.
msg9909 (view) Author: kowey Date: 2010-01-28.17:11:17
OK, I know who's getting the Grumpy Old Man hat if somebody ever decides
to implement this... :-) (Grumpy is Good)
msg9910 (view) Author: markstos Date: 2010-01-28.17:32:02
On Thu, 28 Jan 2010 17:09:31 +0000
Reinier Lamers <bugs@darcs.net> wrote:

> 
> Reinier Lamers <reinier.lamers@gmail.com> added the comment:
> 
> Just let me add that I am strongly against this feature (and all other
> of the "I want to X while Y'ing" kind). There's a reason that "darcs
> record" is "darcs record" and not "darcs revert". If we build
> shortcuts to other darcs commands into the interactive prompts for
> commands, that's going to be a huge amount of UI clutter. It also
> breaks the property that a record does not change your working copy,
> thus making darcs less predictable.

Despite have recently expressed that I'd like to edit files while in
record, Reiner's comments ring true with me.

While doing two steps (record than revert) can be slower, it's also
arguably simpler, and I do appreciate darc's simplicity, and I realize
that sometimes to preserve we have to resist adding features that we
would sometimes use when the same thing can be accomplished with
multiple steps with existing simpler tools. 

   Mark
msg9911 (view) Author: zooko Date: 2010-01-28.17:40:17
For small enough sets of changes, I don't mind running two commands.

Occasionally there is a large set of changes, and I've already invested
many minutes picking through them deciding which ones to record, when I
see something that needs to be reverted. If I stop now and go revert it
then I have to redo my minutes of picking changes. If I continue picking
changes, then I have to remember to come back and find it again and
revert it afterward.  That's the only time that I want this feature.
msg12909 (view) Author: galbolle Date: 2010-11-04.21:06:08
One way to have this feature would be to have multi-record, as follows:

In record, hit 2 (instead of 'y') to put the change into a second patch. 
This complements nicely hunk splitting and interactive selection. It 
would also allow you to revert on record by recording bad changes into a 
garbage patch, then obliterating it. This still preserves record's 
invariants.
msg12923 (view) Author: markstos Date: 2010-11-05.13:49:06
On 11/04/2010 05:06 PM, Florent Becker wrote:
> 
> Florent Becker <florent.becker@ens-lyon.org> added the comment:
> 
> One way to have this feature would be to have multi-record, as follows:
> 
> In record, hit 2 (instead of 'y') to put the change into a second patch. 
> This complements nicely hunk splitting and interactive selection. It 
> would also allow you to revert on record by recording bad changes into a 
> garbage patch, then obliterating it. This still preserves record's 
> invariants.

I would find that confusing, as hunk-editing already creates a second
patch.

After using the hunk-editor some, I've found it fairly efficient. It
would still be nice to have to have a "revert" option during record, but
I also understand now that this goes against record being read-only.

    Mark
msg12946 (view) Author: dsf Date: 2010-11-08.18:54:40
On Thu, Nov 4, 2010 at 2:06 PM, Florent Becker <bugs@darcs.net> wrote:
>
> Florent Becker <florent.becker@ens-lyon.org> added the comment:
>
> One way to have this feature would be to have multi-record, as follows:
>
> In record, hit 2 (instead of 'y') to put the change into a second patch.
> This complements nicely hunk splitting and interactive selection. It
> would also allow you to revert on record by recording bad changes into a
> garbage patch, then obliterating it. This still preserves record's
> invariants.

To me, this gets into the realm of issues that would be addressed by a
nice graphical user interface.

-david
msg13054 (view) Author: kowey Date: 2010-11-15.12:00:21
David sent the following reply, but I had accidentally screened it out
in the mailman moderation queue.  Sorry!

On Sun, Nov 07, 2010 at 06:30:18 -0800, David Fox wrote:
> > Florent Becker <florent.becker@ens-lyon.org> added the comment:
> >
> > One way to have this feature would be to have multi-record, as follows:
> >
> > In record, hit 2 (instead of 'y') to put the change into a second patch.
> > This complements nicely hunk splitting and interactive selection. It
> > would also allow you to revert on record by recording bad changes into a
> > garbage patch, then obliterating it. This still preserves record's
> > invariants.
> 
> To me, this gets into the realm of issues that would be addressed by a
> nice graphical user interface.
> 
> -david

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:kowey@jabber.fr (Jabber or Google Talk only)
msg13058 (view) Author: dsf Date: 2010-11-15.14:16:16
I said this: To me, this gets into the realm of issues that would be
addressed by a
nice graphical user interface.

On Mon, Nov 15, 2010 at 3:54 AM, Eric Kow <kowey@darcs.net> wrote:
> David sent the following reply, but I had accidentally screened it out
> in the mailman moderation queue.  Sorry!
>
> On Sun, Nov 07, 2010 at 06:30:18 -0800, David Fox wrote:
>> > Florent Becker <florent.becker@ens-lyon.org> added the comment:
>> >
>> > One way to have this feature would be to have multi-record, as follows:
>> >
>> > In record, hit 2 (instead of 'y') to put the change into a second patch.
>> > This complements nicely hunk splitting and interactive selection. It
>> > would also allow you to revert on record by recording bad changes into a
>> > garbage patch, then obliterating it. This still preserves record's
>> > invariants.
>>
>> To me, this gets into the realm of issues that would be addressed by a
>> nice graphical user interface.
>>
>> -david
>
> --
> Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
> For a faster response, try +44 (0)1273 64 2905 or
> xmpp:kowey@jabber.fr (Jabber or Google Talk only)
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkzhH3UACgkQBUrOwgisBPkKqACfZ䍈ﺱ﵁盐鐲냣户�
> 3aYAoIXgVvQWad7w59J/GRyNF/fjABli
> =ARuy
> -----END PGP SIGNATURE-----
>
>
History
Date User Action Args
2010-01-28 15:33:21koweycreate
2010-01-28 15:37:08adminsetnosy: + droundy, beschmi, simon
messages: + msg2872, msg6950, msg6951, msg8683
2010-01-28 17:09:30reinier.lamerssetnosy: + reinier.lamers
messages: + msg9908
2010-01-28 17:11:19koweysetmessages: + msg9909
2010-01-28 17:32:04markstossetmessages: + msg9910
2010-01-28 17:40:21zookosetmessages: + msg9911
2010-02-02 17:30:11koweysetnosy: - droundy
2010-08-23 08:08:34koweysetnosy: + dsf
2010-08-23 08:09:20koweylinkissue1929 superseder
2010-11-04 21:06:09galbollesetmessages: + msg12909
2010-11-05 13:49:07markstossetmessages: + msg12923
2010-11-08 18:54:41dsfsetmessages: + msg12946
2010-11-15 12:00:21koweysetmessages: + msg13054
2010-11-15 14:16:17dsfsetmessages: + msg13058