darcs

Issue 59 "darcs review" command to review patch patches as if during a pull

Title "darcs review" command to review patch patches as if during a pull
Priority wishlist Status resolved
Milestone Resolved in
Superseder Nosy List SamB, darcs-devel, dmitry.kurochkin, jch, kapheine, kowey, markstos, thorkilnaur, tommy
Assigned To kapheine
Topics Patch

Created on 2005-12-15.19:03:44 by SamB, last changed 2009-10-24.00:36:05 by admin.

Files
File name Uploaded Type Edit Remove
add_y_and_n_commands_to_changes_interactive.dpatch kapheine1, 2006-01-15.05:51:59 text/x-darcs-patch
support_interactive_option_in_changes_command_issue_59.dpatch kapheine1, 2005-12-21.05:29:08 text/x-darcs-patch
Messages
msg223 (view) Author: SamB Date: 2005-12-15.19:03:43
It would be nice to be able to look through the patches in ones own repo in the
same way that one can look through patches in "darcs pull". unpull sorta helps
with that, but it doesn't feel warm and fuzzy, and it doesn't help much with
depended-on patches...
msg229 (view) Author: droundy Date: 2005-12-16.13:02:38
Perhaps this should be "darcs changes --interactive"? That would seem more
consistent to me.
-- 
David Roundy
msg236 (view) Author: SamB Date: 2005-12-17.05:34:28
Yeah, probably ;-)
msg249 (view) Author: kapheine Date: 2005-12-21.05:29:08
> It would be nice to be able to look through the patches in ones own repo in the
> same way that one can look through patches in "darcs pull". unpull sorta helps
> with that, but it doesn't feel warm and fuzzy, and it doesn't help much with
> depended-on patches...

Attached is my attempt at implementing this as an --interactive option
to changes, as suggested by David.  I went into some unknown
territories here so if anyone has time to sanity check this I would
appreciate it.

Specifically, I'm curious if "s <- slurp_recorded repository" in
Changes.lhs is the correct slurpy to pass in.  The value isn't
actually used (with_any_selected_changes ignores the slurpy parameter)
but it probably should contain the correct value either way.
Attachments
msg292 (view) Author: SamB Date: 2006-01-02.00:13:58
I notice that this patch won't apply to my partial repo...
msg311 (view) Author: SamB Date: 2006-01-05.18:33:46
Okay, I've been directed to the darcs-unstable repo and after pulling from that
this patch applies nicely. It works nicely too ;-). Thank you, kapheine1! How
can this get into the darcs-unstable repo?
msg313 (view) Author: jch Date: 2006-01-06.15:57:50
> Attached is my attempt at implementing this as an --interactive option
> to changes,

It looks very useful to me, so I'm applyting it notwithstanding your doubts.

> Specifically, I'm curious if "s <- slurp_recorded repository" in
> Changes.lhs is the correct slurpy to pass in.  The value isn't
> actually used (with_any_selected_changes ignores the slurpy parameter)
> but it probably should contain the correct value either way.

David, Ian, could either of your clarify that?  My gut instinct is
that we should remove the extra argument unless someone can explain
what purpose it was meant to serve.

                                        Juliusz
msg314 (view) Author: jch Date: 2006-01-06.16:22:12
Zachary,

I'm already finding this useful -- but there's one thing I find
confusing.  The prompts says ``Shall I continue to view changes?'',
but answering ``y'' or ``n'' has no effect.

                                        Juliusz
msg315 (view) Author: jch Date: 2006-01-06.16:22:42
Oh, and a feature request -- any chance for a key that allows viewing
in the format of ``darcs send -u'' ?

                                        Juliusz
msg316 (view) Author: igloo Date: 2006-01-06.19:47:18
On Fri, Jan 06, 2006 at 04:57:29PM +0100, Juliusz Chroboczek wrote:
> 
> > Specifically, I'm curious if "s <- slurp_recorded repository" in
> > Changes.lhs is the correct slurpy to pass in.  The value isn't
> > actually used (with_any_selected_changes ignores the slurpy parameter)
> > but it probably should contain the correct value either way.
> 
> David, Ian, could either of your clarify that?  My gut instinct is
> that we should remove the extra argument unless someone can explain
> what purpose it was meant to serve.

I think it's on its way to allowing you to see context of patches while
you select.

(Ultimately it probably wants to be something that can be either a
slurpy in memory or a temporary copy on disk).

Thanks
Ian
msg317 (view) Author: jch Date: 2006-01-06.19:55:52
>>> Specifically, I'm curious if "s <- slurp_recorded repository" in
>>> Changes.lhs is the correct slurpy to pass in.  The value isn't
>>> actually used (with_any_selected_changes ignores the slurpy parameter)

> I think it's on its way to allowing you to see context of patches while
> you select.

Ah, okay.  So it looks like the value currently being passed is the
right one.

Thanks for your help.

                                        Juliusz
msg322 (view) Author: kapheine Date: 2006-01-07.02:23:52
On 1/6/06, Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr> wrote:
> Zachary,
>
> I'm already finding this useful -- but there's one thing I find
> confusing.  The prompts says ``Shall I continue to view changes?'',
> but answering ``y'' or ``n'' has no effect.

Juliusz,

Heh, yes.  So it does.  I'm not quite sure how this should work. We
could have "y" be the same as "k" and "n" be the same as "q".  But I'm
not sure it is a good idea to have multiple letters do the same thing.
 So another option might be to have the prompt say something like
"Next command?" instead.  Does anyone have any thoughts?
msg323 (view) Author: kapheine Date: 2006-01-07.02:26:36
On 1/6/06, Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr> wrote:
> Oh, and a feature request -- any chance for a key that allows viewing
> in the format of ``darcs send -u'' ?

Juliusz,

I wrote up a little patch to do this, but I think that if we use it,
we will also need to add it to all of the interactive patch selecting
commands, for consistency.  Is this a good idea?  Personally I don't
mind the normal (non-u) format for this type of patch viewing, but if
other people use it I see no reason why we shouldn't add it.

If people do want the future, what should the keys be?  We'll need one
for showing the -u style and another for paging -u (parallels of 'v'
and 'p')
msg324 (view) Author: droundy Date: 2006-01-07.12:58:21
On Fri, Jan 06, 2006 at 07:47:09PM +0000, Ian Lynagh wrote:
> On Fri, Jan 06, 2006 at 04:57:29PM +0100, Juliusz Chroboczek wrote:
> > 
> > > Specifically, I'm curious if "s <- slurp_recorded repository" in
> > > Changes.lhs is the correct slurpy to pass in.  The value isn't
> > > actually used (with_any_selected_changes ignores the slurpy
> > > parameter) but it probably should contain the correct value either
> > > way.
> > 
> > David, Ian, could either of your clarify that?  My gut instinct is that
> > we should remove the extra argument unless someone can explain what
> > purpose it was meant to serve.
> 
> I think it's on its way to allowing you to see context of patches while
> you select.

Right, that's the idea, it just never got implemented.  It shouldn't be too
hard, it's just that we'd need to bit of bookkeeping to update the slurpy
for each patch we want to view with context.
-- 
David Roundy
http://www.darcs.net
msg327 (view) Author: tommy Date: 2006-01-07.22:39:21
On Sat, Jan 07, 2006 at 02:26:37AM +0000, Zachary P. Landau wrote:
> If people do want the future, what should the keys be?  We'll need one
> for showing the -u style and another for paging -u (parallels of 'v'
> and 'p')

A radical thought would be to drop the -u flags and use the
-u format always everywhere possible.  I don't think it will
be hard for anyone getting used to.  If darcs had stared out
this way, would anyone ever have thought of wishing for the
"cramped" format?
msg334 (view) Author: jch Date: 2006-01-09.11:16:53
> Heh, yes.  So it does.  I'm not quite sure how this should work. We
> could have "y" be the same as "k" and "n" be the same as "q".  But I'm
> not sure it is a good idea to have multiple letters do the same thing.
>  So another option might be to have the prompt say something like
> "Next command?" instead.  Does anyone have any thoughts?

I'm hopeless at UI design, but I like the former better -- it makes it
pretty clear that pressing ``y'' will Do The Right Thing.

I also suggest that just pressing enter is equivalent to pressing n.

                                        Juliusz
msg335 (view) Author: jch Date: 2006-01-09.11:19:15
> I wrote up a little patch to do this,

I would definitely use the feature.

> but I think that if we use it, we will also need to add it to all of
> the interactive patch selecting commands, for consistency.  Is this
> a good idea?

I believe it is, but as far as I'm concerned, it can wait.  (I tend to
``pull -a'', then review the changes, and unpull anything I didn't
like.)

> If people do want the future, what should the keys be?  We'll need one
> for showing the -u style and another for paging -u (parallels of 'v'
> and 'p')

Upper-case `V' and `P'?  Or does anyone have a better idea?

                                        Juliusz
msg337 (view) Author: kapheine Date: 2006-01-09.15:37:35
On 1/9/06, Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr> wrote:
> > Heh, yes.  So it does.  I'm not quite sure how this should work. We
> > could have "y" be the same as "k" and "n" be the same as "q".  But I'm
> > not sure it is a good idea to have multiple letters do the same thing.
> >  So another option might be to have the prompt say something like
> > "Next command?" instead.  Does anyone have any thoughts?
>
> I'm hopeless at UI design, but I like the former better -- it makes it
> pretty clear that pressing ``y'' will Do The Right Thing.
>

I don't have a problem with this.

> I also suggest that just pressing enter is equivalent to pressing n.

I am a little bit worried about this.  Enter becomes a Quit key, which
seems awkward.  But maybe that is not such a bad thing since it is
only for patch reviewing, not for any real action.  I have no strong
opinion, really.
msg338 (view) Author: kapheine Date: 2006-01-09.15:39:51
On 1/9/06, Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr> wrote:
> > If people do want the future, what should the keys be?  We'll need one
> > for showing the -u style and another for paging -u (parallels of 'v'
> > and 'p')
>
> Upper-case `V' and `P'?  Or does anyone have a better idea?

I believe capital letters are purposefully unused because the commands
are shown capitalized in the prompt to show which one is the default.

Maybe 'u' and 'i'?  u for unified and i because it is next to u :P
msg340 (view) Author: jch Date: 2006-01-09.17:03:54
>> I'm hopeless at UI design, but I like the former better -- it makes it
>> pretty clear that pressing ``y'' will Do The Right Thing.

[...]

>> I also suggest that just pressing enter is equivalent to pressing n.

I meant ``y'', of course.

> I am a little bit worried about this.

Sorry for the confustion.

                                        Juliusz
msg341 (view) Author: jch Date: 2006-01-09.17:05:59
> Maybe 'u' and 'i'?  u for unified and i because it is next to u

No objection as far as I'm concerned, although I'm still hoping
someone will have a better idea than ``i''.

                                        Juliusz
msg376 (view) Author: kapheine Date: 2006-01-15.05:51:59
On 1/9/06, Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr> wrote:
> > Heh, yes.  So it does.  I'm not quite sure how this should work. We
> > could have "y" be the same as "k" and "n" be the same as "q".  But I'm
> > not sure it is a good idea to have multiple letters do the same thing.
> >  So another option might be to have the prompt say something like
> > "Next command?" instead.  Does anyone have any thoughts?
>
> I'm hopeless at UI design, but I like the former better -- it makes it
> pretty clear that pressing ``y'' will Do The Right Thing.
>
> I also suggest that just pressing enter is equivalent to pressing n.

Juliusz,

Attached is a patch implementing with your proposed changes.
Attachments
msg516 (view) Author: tommy Date: 2006-02-28.11:54:36
following patch included in 1.0.6
Wed Dec 21 06:20:49 CET 2005  Zachary P. Landau <kapheine@divineinvasion.net>
  * Support --interactive option in changes command (issue #59).

What about the y/n-think, it's too soon to close this wish yet, or?
msg527 (view) Author: kapheine Date: 2006-03-01.03:14:19
> following patch included in 1.0.6
> Wed Dec 21 06:20:49 CET 2005  Zachary P. Landau <kapheine@divineinvasion.net>
>   * Support --interactive option in changes command (issue #59).
>
> What about the y/n-think, it's too soon to close this wish yet, or?

I don't know if you saw it, but I did post a followup patch to
implement y/n.  Whether or not it should be included, I'm not sure.  I
understand the case for consistency, but it also may be a little
confusing because you aren't being asked a question :P
msg554 (view) Author: markstos Date: 2006-03-04.13:40:59
I just got a first impression of trying this command, without having followed     
any of the previous design discussions from this ticket. I was interested to     
see that my ideas had already been discussed. Here are the points that     
immediately struck me:      
     
- I am being asked a "yes/no" question, so I expected "y" and "n" to work. As     
someone else mentioned "y" should map to "j" to proceed, and "n"  to "q" to    
quit.      
     
- I expected Enter to also map to "j" to proceed, as this approximates what     
more and less do, and paging is more or less what we are doing. :)  Instead,     
something scary happened. darcs hung. I quickly backgrounded it and checked to     
see if it was pegging my CPU. It wasn't. I soon realized it was just sitting     
there, waiting for more input. If "Enter" doesn't get mapped to "yes, proceed",     
that it should at least cause the prompt to be repeated, which makes it very     
clear it is still waiting for input.      
     
Thanks for this command, I like it!
msg722 (view) Author: SamB Date: 2006-07-03.20:22:23
On 06/01/06, Zachary P. Landau <bugs@darcs.net> wrote:
>
> Zachary P. Landau <kapheine@gmail.com> added the comment:
>
> On 1/6/06, Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr> wrote:
> > Zachary,
> >
> > I'm already finding this useful -- but there's one thing I find
> > confusing.  The prompts says ``Shall I continue to view changes?'',
> > but answering ``y'' or ``n'' has no effect.
>
> Juliusz,
>
> Heh, yes.  So it does.  I'm not quite sure how this should work. We
> could have "y" be the same as "k" and "n" be the same as "q".  But I'm
> not sure it is a good idea to have multiple letters do the same thing.
>  So another option might be to have the prompt say something like
> "Next command?" instead.  Does anyone have any thoughts?

"What now?"
History
Date User Action Args
2005-12-15 19:03:44SamBcreate
2005-12-16 13:02:39droundysetstatus: unread -> unknown
messages: + msg229
2005-12-17 05:34:29SamBsetstatus: unknown -> unread
messages: + msg236
2005-12-21 05:29:09kapheine1setfiles: + support_interactive_option_in_changes_command_issue_59.dpatch
status: unread -> unknown
messages: + msg249
nosy: + kapheine1
2005-12-21 15:13:33droundysettopic: + Patch
nosy: droundy, tommy, SamB, kapheine1
2006-01-02 00:13:59SamBsetnosy: droundy, tommy, SamB, kapheine1
messages: + msg292
2006-01-05 00:02:23kapheinelinkissue82 superseder
2006-01-05 18:33:47SamBsetnosy: droundy, tommy, SamB, kapheine1
messages: + msg311
2006-01-06 15:57:51jchsetnosy: + jch
messages: + msg313
2006-01-06 16:22:13jchsetnosy: droundy, jch, tommy, SamB, kapheine1
messages: + msg314
2006-01-06 16:22:42jchsetnosy: droundy, jch, tommy, SamB, kapheine1
messages: + msg315
2006-01-06 19:47:19igloosetnosy: + igloo
messages: + msg316
2006-01-06 19:55:54jchsetnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg317
2006-01-07 02:23:53kapheine1setnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg322
2006-01-07 02:26:37kapheine1setnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg323
2006-01-07 12:58:22droundysetnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg324
2006-01-07 22:39:21tommysetnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg327
2006-01-09 11:16:54jchsetnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg334
2006-01-09 11:19:16jchsetnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg335
2006-01-09 15:37:36kapheine1setnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg337
2006-01-09 15:39:51kapheine1setnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg338
2006-01-09 17:03:55jchsetnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg340
2006-01-09 17:06:01jchsetnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg341
2006-01-15 05:52:00kapheine1setfiles: + add_y_and_n_commands_to_changes_interactive.dpatch
nosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg376
2006-01-15 12:43:36droundysetnosy: droundy, jch, tommy, SamB, kapheine1, igloo
2006-02-28 11:54:39tommysetnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg516
2006-03-01 03:14:21kapheine1setnosy: droundy, jch, tommy, SamB, kapheine1, igloo
messages: + msg527
2006-03-04 13:41:00markstossetnosy: + markstos
messages: + msg554
2006-03-04 13:41:41markstossetnosy: droundy, jch, tommy, markstos, SamB, kapheine1, igloo
title: "darcs review" command to review patch patches as if during a pull -> implement "darcs changes --interactive"
2006-03-26 00:05:38jchsetstatus: unknown -> resolved
nosy: droundy, jch, tommy, markstos, SamB, kapheine1, igloo
2006-07-03 20:22:26SamBsetstatus: resolved -> unknown
nosy: droundy, jch, tommy, markstos, SamB, kapheine1, igloo
messages: + msg722
title: implement "darcs changes --interactive" -> "darcs review" command to review patch patches as if during a pull
2006-07-04 11:48:20droundysetstatus: unknown -> resolved
nosy: droundy, jch, tommy, markstos, SamB, kapheine1, igloo
2009-08-06 17:38:33adminsetnosy: + jast, Serware, dmitry.kurochkin, darcs-devel, zooko, dagit, mornfall, simon, kowey, beschmi, thorkilnaur, - droundy, jch, SamB, kapheine1, igloo
2009-08-06 20:47:16adminsetnosy: - beschmi
2009-08-10 22:11:15adminsetnosy: + SamB, kapheine1, igloo, jch, - darcs-devel, zooko, jast, dagit, Serware, mornfall
2009-08-25 17:19:28adminsetnosy: + darcs-devel, - igloo
2009-08-25 17:52:12adminsetnosy: - simon
2009-08-27 13:47:33adminsetnosy: jch, tommy, kowey, markstos, darcs-devel, SamB, kapheine1, thorkilnaur, dmitry.kurochkin
2009-10-24 00:35:57adminsetassignedto: kapheine1 -> kapheine
nosy: + kapheine
2009-10-24 00:36:05adminsetnosy: - kapheine1