darcs

Issue 2089 replace --force UI is confusing

Title replace --force UI is confusing
Priority bug Status resolved
Milestone 2.10.0 Resolved in
Superseder Nosy List jaredj, twb, wilcoxjg
Assigned To
Topics Documentation, ProbablyEasy, UI

Created on 2011-07-13.07:51:51 by wilcoxjg, last changed 2012-01-13.08:39:57 by kowey.

Files
File name Uploaded Type Edit Remove
unnamed wilcoxjg, 2011-07-13.07:51:49 text/html
unnamed wilcoxjg, 2011-07-18.16:57:23 text/html
Messages
msg14588 (view) Author: wilcoxjg Date: 2011-07-13.07:51:49
I usually love darcs but I recently had a very bad experience with the UI.

  I was running 'darcs replace --force A B foole'.  The '--force' was
included because B already existed in 'foole'.

  After running the replace I ran 'darcs record' to view the hunks and see
that things were as I believed they should be in foole.   In particular I
expected to see lines with A removed and lines with B added...

  Instead I saw the opposite!   Lines with B were removed and lines with A
were added.   This was bewildering.   I canceled the 'record' since it was
behaving oddly.

  I now know (because Zooko) explained it to me, that replacing all B's with
A was a preparatory step that --force caused in order to allow the replace
to occur.

  Some sort of warning in the 'replace --force' documentation would be nice.

 Thanks for your wonderful tool!


--Zancas
http://en.wikipedia.org/wiki/Military_budget_of_the_United_States

http://tahoe-lafs.org <http://tahoe-lafs.org/trac/tahoe-lafs>
<http://allmydata.org/>
"...the panoptic sort is .. not the result of some massive heinous
centralized bureaucracy.  Rather it is a particular tragedy of the
information commons, wherein each rational actor does that which seems to be
in [ver] best interest but the overall result is the loss of something
valuable." --Alan Wexelblat

"... one of the most insidious effects of panoptic surveillance is that
people begin to self-censor." --Alan Wexelblat

"Google doesn't know `panoptic`." -- Anonymous

"In the universe suddenly restored to its silence, the myriad wondering
little voices of the earth rise up."--Camus
http://members.bellatlantic.net/~samg2/sysiphus.html

"Compliance occurs in many circumstances because other types of behavior are
inconceivable; routines are followed because they are taken for granted as
'the way we do these things'" --
http://en.wikipedia.org/wiki/New_institutionalism
<http://allmydata.org>
Attachments
msg14592 (view) Author: kowey Date: 2011-07-17.06:25:52
Hi Josh, Thanks for your nice mail. I'm glad Zooko isn't completely 
alone in liking Darcs in the Tahoe world ;-)

I agree that that replace --force can be confusing.  I'm not sure what 
we can do about this.

Josh suggests documentation, but we can guess that users typically do 
not read documentation so while it is a necessary step to make, it 
probably is not sufficient.

For us to make progress on this bug, we need some concrete discussion 
and suggestions on ways to make the effects of replace --force more 
self-evident.  One way is to increase the darcs chattiness :-/

For example:

Don't panic! I've changed all instances of 'foo' to 'bar'
so that darcs replace can token-replace them back into 'foo'
again.
msg14594 (view) Author: wilcoxjg Date: 2011-07-18.16:57:23
On Sun, Jul 17, 2011 at 12:25 AM, Eric Kow <bugs@darcs.net> wrote:

>
> Eric Kow <kowey@darcs.net> added the comment:
>
> Hi Josh, Thanks for your nice mail. I'm glad Zooko isn't completely
> alone in liking Darcs in the Tahoe world ;-)
>
> I agree that that replace --force can be confusing.  I'm not sure what
> we can do about this.
>
> Josh suggests documentation, but we can guess that users typically do
> not read documentation so while it is a necessary step to make, it
> probably is not sufficient.
>
> For us to make progress on this bug, we need some concrete discussion
> and suggestions on ways to make the effects of replace --force more
> self-evident.  One way is to increase the darcs chattiness :-/
>
> For example:
>
> Don't panic! I've changed all instances of 'foo' to 'bar'
> so that darcs replace can token-replace them back into 'foo'
> again.
>
> ----------
> nosy: +twb
> priority:  -> bug
> title: Dear DARCSians -> replace --force UI is confusing
> topic: +Documentation, UI
>
>     I think your example of chattiness sounds would have been sufficient
for me.
 Thanks!
--Zancas
Attachments
msg14616 (view) Author: zooko Date: 2011-07-28.05:35:16
Please also read
http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1120#comment:5 and
http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1120#comment:7 .

"In conclusion, there's too much I don't understand about darcs replace,
that makes me lack confidence in reviewing patches that use it. For
patches that use only explicit hunks, I can often (not always) review
them without actually applying them to see the effects; for replace
patches that seems never to be the case :-( "
msg14617 (view) Author: kowey Date: 2011-07-28.07:11:24
Another idea to explore: perhaps the darcs replace UI should NOT suggest 
replace --force, but recording a separate preparation patch for darcs 
replace.

 Skipping file 'src/NLP/GenI/OptimalityTheory.lhs'
 Perhaps the recorded version of this file already contains 'Arrow'?
 Create a separate patch renaming those instances to something else.
 Try replace --prepare Fleche Arrow for help

If the user types in 'darcs replace --prepare Fleche Arrow', darcs will 
dump the usual Arrow => Fleche hunks in your unrecorded state and fire 
up a darcs record with these hunks pre-cherry-picked.  It could get icky 
if there is a dependency on some unrelated unrecorded change, though.
msg14632 (view) Author: ganesh Date: 2011-08-13.13:25:31
I think the simplest resolution for this is for darcs to produce some 
output along the lines kowey suggests when --force is used.
msg14770 (view) Author: markstos Date: 2011-10-13.13:17:46
I don't think this is a recent regression, so bumping to darcs 2.10.
msg14999 (view) Author: kowey Date: 2012-01-13.08:39:51
Fixed by patch662, but see issue2125 for a slight repression
History
Date User Action Args
2011-07-13 07:51:51wilcoxjgcreate
2011-07-17 06:25:55koweysetpriority: bug
topic: + UI, Documentation
title: Dear DARCSians -> replace --force UI is confusing
messages: + msg14592
nosy: + twb
2011-07-18 16:57:24wilcoxjgsetfiles: + unnamed
messages: + msg14594
2011-07-28 05:35:17zookosetmessages: + msg14616
2011-07-28 07:11:26koweysetmessages: + msg14617
2011-08-13 13:25:34ganeshsettopic: + ProbablyEasy
nosy: + jaredj
messages: + msg14632
milestone: 2.8.0
2011-10-13 13:17:47markstossetmessages: + msg14770
milestone: 2.8.0 -> 2.10.0
2012-01-13 08:39:51koweysetmessages: + msg14999
2012-01-13 08:39:57koweysetstatus: unknown -> resolved