Created on 2009-01-06.15:37:28 by zooko, last changed 2009-10-23.23:59:46 by admin.
msg6998 (view) |
Author: zooko |
Date: 2009-01-06.15:37:24 |
|
I just noticed that nowadays I always add "-i" when I run "darcs
changes". (In the olden days I always added " | less".)
It occurs to me that just as "darcs record" is by default interactive
and the user has to specify "--all" if he wants non-interactive batch
mode, so "darcs changes" could by default be interactive and "--all"
could indicate non-interactive batch mode. I've also noticed that
when I'm instructing newbies in how to use darcs I often have to tell
them to add "-i" so that they can get what they want out of running
"darcs changes".
This might break scripts which are running "darcs changes" an
expecting batch mode currently, but in the long run it would be
better to have more user friendliness and consistency. Scripts can
insulate themselves against such a change by explicitly passing "--
all" for invocations which require batch mode.
Hm -- "darcs changes --help" lists "--all" as meaning "answer yes to
all patches". I think that's a mistake of documentation.
Regards,
Zooko
---
Tahoe, the Least-Authority Filesystem -- http://allmydata.org
store your data: $10/month -- http://allmydata.com/?tracking=zsig
|
msg6999 (view) |
Author: kowey |
Date: 2009-01-06.15:42:42 |
|
Please also post a summary and link to this issue in
http://wiki.darcs.net/index.html/DefaultSwitches
so that we can decide on the list of defaults to change by 2.3
|
msg7006 (view) |
Author: WorldMaker |
Date: 2009-01-06.17:57:21 |
|
Zooko wrote:
> New submission from Zooko <zooko@zooko.com>:
>
> I just noticed that nowadays I always add "-i" when I run "darcs
> changes". (In the olden days I always added " | less".)
I still tend to use successions of darcs changes --last=n with n gently
increasing as I only discovered changes -i a few months back and it
still hasn't settled into my usage patterns.
> It occurs to me that just as "darcs record" is by default interactive
> and the user has to specify "--all" if he wants non-interactive batch
> mode, so "darcs changes" could by default be interactive and "--all"
> could indicate non-interactive batch mode. I've also noticed that
> when I'm instructing newbies in how to use darcs I often have to tell
> them to add "-i" so that they can get what they want out of running
> "darcs changes".
+1.
> This might break scripts which are running "darcs changes" an
> expecting batch mode currently, but in the long run it would be
> better to have more user friendliness and consistency. Scripts can
> insulate themselves against such a change by explicitly passing "--
> all" for invocations which require batch mode.
Any major script relying on darcs changes should probably be using
--xml-output or --context anyway.
|
msg7007 (view) |
Author: radford |
Date: 2009-01-06.18:32:07 |
|
On Tue, Jan 06, 2009 at 12:57:10PM -0500, Max Battcher wrote:
> Zooko wrote:
> > New submission from Zooko <zooko@zooko.com>:
> > I just noticed that nowadays I always add "-i" when I run "darcs
> > changes". (In the olden days I always added " | less".)
Interesting. I use (with the default search set via the $LESS
environment variable)
darcs changes -v | less '+/^[^ ]+'
so I can use 'n' and 'N' by default, while still being able to search
for arbitrary text in the hunks.
I'm starting to really like the git default of outputing to $PAGER
when the output is a terminal. It's almost always what.
I can't imagine -i being better than searching in less.
> > It occurs to me that just as "darcs record" is by default interactive
> > and the user has to specify "--all" if he wants non-interactive batch
> > mode, so "darcs changes" could by default be interactive and "--all"
> > could indicate non-interactive batch mode. I've also noticed that
> > when I'm instructing newbies in how to use darcs I often have to tell
> > them to add "-i" so that they can get what they want out of running
> > "darcs changes".
This is just a sign that we should default to paging the output.
Maybe we could also set LESS='+/^[^ ]+ $LESS' in the environment for
easily skipping to the next chunk by default.
> > This might break scripts which are running "darcs changes" an
> > expecting batch mode currently, but in the long run it would be
> > better to have more user friendliness and consistency. Scripts can
> > insulate themselves against such a change by explicitly passing "--
> > all" for invocations which require batch mode.
> Any major script relying on darcs changes should probably be using
> --xml-output or --context anyway.
Hardly. If for some reason you like -i better than less, then you can
check if the output filehandle is a tty, and if so default to -i, but
please don't and use $PAGER instead. :)
-Jim
|
msg7008 (view) |
Author: btcoburn |
Date: 2009-01-07.02:49:30 |
|
IMHO, that is not a good idea (put it in your ~/.darcs/defaults if you
want, "-i" is short and convenient even if you don't).
I regularly do things like "darcs changes -p<spontaneous_branch>" to
see what I'm working on before collapsing it into a single feature
patch. Would you have everyone who was selecting a *subset* of changes
add "--all" to their options list? That would be much more confusing....
P.S. Thanks for the question. I never realized "darcs changes -i" was
interesting, in that it is a quick way to view the raw patches as
darcs sees them (albeit with a little coloring). I no longer have to
use "darcs send -o tmp.dpatch <somewhere>" just to see the raw
patches. :-)
Regards, Ben Coburn
|
msg7009 (view) |
Author: WorldMaker |
Date: 2009-01-07.04:14:06 |
|
Ben Coburn wrote:
> P.S. Thanks for the question. I never realized "darcs changes -i" was
> interesting, in that it is a quick way to view the raw patches as
> darcs sees them (albeit with a little coloring). I no longer have to
> use "darcs send -o tmp.dpatch <somewhere>" just to see the raw
> patches. :-)
FYI: You can use ``darcs annotate --patch "Patch Name"`` (or some
variant of --match) for that as well.
|
msg7146 (view) |
Author: gwern |
Date: 2009-01-20.01:28:24 |
|
(I would comment at http://bugs.darcs.net/issue610 but that's closed.)
I like the idea of 'darcs changes' using less. That's how I usually use it. It
strikes me as being as sensible as the --help system of using pagers on >screen
output.
|
msg8349 (view) |
Author: kowey |
Date: 2009-08-22.12:15:49 |
|
Sorry, I think this would constitute UI-churn (*) and I recommend we not fix it.
(*) I'm defining churn here as constant change with unclear benefit
And if I may defend the current behaviour, I think it's perfectly consistent for
action commands (record, send, etc) to be interactive by default (apply -i for
example, I would not object to) and for view commands not to be.
|
|
Date |
User |
Action |
Args |
2009-01-06 15:37:28 | zooko | create | |
2009-01-06 15:42:44 | kowey | set | status: unread -> unknown nosy:
kowey, zooko, simon, thorkilnaur, dmitry.kurochkin messages:
+ msg6999 |
2009-01-06 17:57:24 | maxbattcher | set | nosy:
+ darcs-devel, maxbattcher messages:
+ msg7006 |
2009-01-06 18:32:12 | radford | set | nosy:
+ radford messages:
+ msg7007 |
2009-01-07 02:49:33 | btcoburn | set | nosy:
+ btcoburn messages:
+ msg7008 |
2009-01-07 04:14:09 | maxbattcher | set | nosy:
kowey, darcs-devel, zooko, maxbattcher, simon, thorkilnaur, btcoburn, dmitry.kurochkin, radford messages:
+ msg7009 |
2009-01-11 13:36:49 | twb | set | topic:
+ UI nosy:
kowey, darcs-devel, zooko, maxbattcher, simon, thorkilnaur, btcoburn, dmitry.kurochkin, radford |
2009-01-20 01:28:28 | gwern | set | priority: feature nosy:
+ gwern messages:
+ msg7146 |
2009-08-22 12:15:51 | kowey | set | status: unknown -> wont-fix nosy:
kowey, darcs-devel, zooko, maxbattcher, simon, thorkilnaur, btcoburn, gwern, dmitry.kurochkin, radford messages:
+ msg8349 |
2009-08-25 17:38:12 | admin | set | nosy:
- simon |
2009-08-27 14:29:29 | admin | set | nosy:
kowey, darcs-devel, zooko, maxbattcher, thorkilnaur, btcoburn, gwern, dmitry.kurochkin, radford |
2009-10-23 23:59:46 | admin | set | nosy:
+ WorldMaker, - maxbattcher |
|