Created on 2008-05-29.15:22:45 by zooko, last changed 2017-07-27.12:36:23 by gh.
msg4877 (view) |
Author: zooko |
Date: 2008-05-29.15:22:43 |
|
I was just telling my wife how before I use darcs replace, I like to
use "grep" to search for the token that is going to be replaced and
scan through it to make sure there aren't false matches (things that
I don't want to replace but that happen to have that token).
She said "There isn't a 'darcs replace --interactive'?". I thought
that was a pretty good idea.
:-)
--Z
|
msg4884 (view) |
Author: kowey |
Date: 2008-05-29.19:47:39 |
|
Could you give us an example transcript?
|
msg5502 (view) |
Author: galbolle |
Date: 2008-08-14.10:01:54 |
|
Implementing a good UI for this within darcs can be quite hard. Here is a
proposal that allows the UI to be made by an external app, or an emacs/vi/yi/…
macro.
Have darcs replace take a --false-matches=FILE option. This file is a list of
coordinates (file:line:col) of false matches.
Darcs replace old new file --false-matches=fm produces the following composition
of primitive patches.
-a hunk that changes every occurence of "old" at a coordinate in fm to "_old_"
-the replace patch old -> new
-a hunk that changes the occurences of "_old_" at a coordinate in fm to "old"
Then an interactive tool would show each occurence of old in files, ask whether
to change it, if not, put it in a /tmp/false-matches patch, and call darcs
replace old new files --false-matches=/tmp/false-matches.
We would need to make the delimiters for escaping the false matches into a
preference.
|
msg8365 (view) |
Author: kowey |
Date: 2009-08-23.00:34:02 |
|
OK, I think I see in my mind's eye what Zooko and wife are requesting. For each
instance of a token, you want a prompt with 'shall I replace this instance?'
I'll invoke the keep-it-simple principle here again and recommend we not attempt
this.
I think if we did have this feature, people may be 'surprised' to see their 'no'
answers being saved as weird hunk patches going from new back to old.
As for Florent's idea, perhaps http://wiki.darcs.net/Library would be good.
|
msg19501 (view) |
Author: gh |
Date: 2017-07-27.12:36:22 |
|
This was eventually implemented in Darcs 2.10 as `darcs record
--lok-for-replaces`: http://darcs.net/Using/Record#look-for-replace
|
|
Date |
User |
Action |
Args |
2008-05-29 15:22:45 | zooko | create | |
2008-05-29 15:28:40 | zooko | link | issue888 superseder |
2008-05-29 19:47:41 | kowey | set | priority: wishlist nosy:
+ kowey status: unread -> unknown messages:
+ msg4884 title: darcs replace --interactive -> wish: darcs replace --interactive |
2008-05-29 19:47:59 | kowey | set | nosy:
tommy, beschmi, kowey, zooko, dagit assignedto: zooko |
2008-08-14 10:01:56 | galbolle | set | nosy:
+ darcs-devel, galbolle, simon messages:
+ msg5502 |
2008-08-14 10:07:51 | kowey | set | nosy:
tommy, beschmi, kowey, darcs-devel, zooko, dagit, simon, galbolle assignedto: zooko -> |
2008-08-14 15:28:00 | simon | set | nosy:
tommy, beschmi, kowey, darcs-devel, zooko, dagit, simon, galbolle |
2008-08-14 15:28:32 | simon | set | nosy:
tommy, beschmi, kowey, darcs-devel, zooko, dagit, simon, galbolle |
2008-08-14 15:29:28 | simon | set | nosy:
- simon |
2009-08-06 21:06:20 | admin | set | nosy:
+ dmitry.kurochkin, simon, thorkilnaur, - beschmi |
2009-08-11 00:15:40 | admin | set | nosy:
- dagit |
2009-08-23 00:34:05 | kowey | set | status: unknown -> wont-fix nosy:
tommy, kowey, darcs-devel, zooko, simon, thorkilnaur, dmitry.kurochkin, galbolle messages:
+ msg8365 |
2009-08-25 18:11:35 | admin | set | nosy:
- simon |
2009-08-27 14:29:50 | admin | set | nosy:
tommy, kowey, darcs-devel, zooko, thorkilnaur, dmitry.kurochkin, galbolle |
2017-07-27 12:36:23 | gh | set | messages:
+ msg19501 |
|