darcs

Patch 468 add a --no-record option to rollback (and 1 more)

Title add a --no-record option to rollback (and 1 more)
Superseder Nosy List galbolle
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-11-17.17:24:12 by galbolle, last changed 2011-05-10.22:36:02 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
add-a-__no_record-option-to-rollback.dpatch galbolle, 2010-11-17.17:24:12 text/x-darcs-patch
add-a-__no_record-option-to-rollback.dpatch galbolle, 2011-01-14.15:59:17 text/x-darcs-patch
unnamed galbolle, 2010-11-17.17:24:12
unnamed galbolle, 2011-01-14.15:59:17
See mailing list archives for discussion on individual patches.
Messages
msg13091 (view) Author: galbolle Date: 2010-11-17.17:24:12
Rollback --no-record rolls back changes from the history without recording
a new pach.

Yet another new flag, but i find myself actually using more
rollback --no-record than plain rollback.

Grumpy old man story is:
- simpler mental model: rolling back and recording the invert patch are
two different operations
- rollback often goes with amend-record (of the same patch or another one),
no more darcs rollback -m "unrecord me" ; darcs unrecord -p "unrecord me"


2 patches for repository http://darcs.net/screened:

Wed Nov 17 17:58:01 CET 2010  Florent Becker <florent.becker@ens-lyon.org>
  * add a --no-record option to rollback

Wed Nov 17 18:02:28 CET 2010  Florent Becker <florent.becker@ens-lyon.org>
  * Add a test for rollback --dont-record
Attachments
msg13094 (view) Author: kerneis Date: 2010-11-17.17:43:00
On Wed, Nov 17, 2010 at 05:24:12PM +0000, Florent Becker wrote:
>   * add a --no-record option to rollback
>   * Add a test for rollback --dont-record

This looks inconsistent.  Is it dont-record or no-record?

Best,
-- 
Gabriel
msg13191 (view) Author: ganesh Date: 2010-11-21.22:27:05
+1 for the feature from me, I nearly always use rollback as described.

The benefit of the all-in-one rollback operation in the rare cases that 
you do need it is that it automatically gives you a commit message with a 
helpful message.
msg13198 (view) Author: kowey Date: 2010-11-22.09:46:42
On Sun, Nov 21, 2010 at 22:27:05 +0000, Ganesh Sittampalam wrote:
> +1 for the feature from me, I nearly always use rollback as described.

What if rollback always works this way, but tells you it created a
log file in some temp location?

-- 
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)
msg13225 (view) Author: ganesh Date: 2010-11-23.00:00:17
On Mon, 22 Nov 2010, Eric Kow wrote:

> On Sun, Nov 21, 2010 at 22:27:05 +0000, Ganesh Sittampalam wrote:
>> +1 for the feature from me, I nearly always use rollback as described.
>
> What if rollback always works this way, but tells you it created a
> log file in some temp location?

Might make sense, but even if we flip the default it's probably ok for it 
to do a record as an option.

Ganesh
msg13511 (view) Author: galbolle Date: 2011-01-14.15:59:17
Up to date and coherent version.

2 patches for repository http://darcs.net/screened:

Fri Jan 14 16:44:49 CET 2011  Florent Becker <florent.becker@ens-lyon.org>
  * add a --no-record option to rollback

Fri Jan 14 16:48:05 CET 2011  Florent Becker <florent.becker@ens-lyon.org>
  * test for rollback --no-record
Attachments
msg13513 (view) Author: darcswatch Date: 2011-01-14.16:18:32
This patch bundle (with 113 patches) was just applied to the repository http://darcs.net/screened.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_screened.html#bundle-7df4b2f12b6fb7361fbf7c6eb7ea83c052aebfe5
msg13516 (view) Author: mornfall Date: 2011-01-15.00:39:11
Hey,

> -               (rollItBackNow opts repository ps)
> +               if (rollbackInWorkingDir opts)
> +               then (undoItNow opts repository)
> +               else (rollItBackNow opts repository ps)

I haven't noticed anything else wrong with the patch, but the name
undoItNow (a new one) is, IMHO, pretty bogus. I know that rollItBackNow
has been there before, but I don't think it's a good practice to follow
such precedents. It may be better to rename the old one instead.

What about undoByPatch and undoInWorking? Or something else, but I don't
think "undo" v. "rollback" is the right way to express the difference
between recording a patch and changing the working copy (they are more
or less synonymous to me). Moreover, "ItNow" carries 0 information: it's
quite customary that an action will do stuff when it's called, not a
week later.

Yours,
   Petr

PS: It may be worth double-checking the tentativelyAddToPending call. It
may also be worth doing this just a bit cleaner. Surely applying a patch
to working (95 % of undoItNow) is something that should be abstracted
properly and available as a canned API? Other parts of code do something
very similar, don't they?
msg13644 (view) Author: gh Date: 2011-02-07.15:41:11
Pushing to darcs.net since it is reviewed and darcs.net + this bundle
compiles and bash tests are ok.

I've linked Petr's comments in a new issue http://bugs.darcs.net/issue2040 .
msg13781 (view) Author: darcswatch Date: 2011-03-09.18:35:30
This patch bundle (with 113 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-7df4b2f12b6fb7361fbf7c6eb7ea83c052aebfe5
msg14425 (view) Author: darcswatch Date: 2011-05-10.22:36:02
This patch bundle (with 113 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-7df4b2f12b6fb7361fbf7c6eb7ea83c052aebfe5
History
Date User Action Args
2010-11-17 17:24:12galbollecreate
2010-11-17 17:25:09darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-e573c862456c76765bfdf174e1bec1dcf04c4edf
2010-11-17 17:43:00kerneissetmessages: + msg13094
2010-11-21 22:27:05ganeshsetmessages: + msg13191
2010-11-22 09:46:43koweysetmessages: + msg13198
2010-11-23 00:00:17ganeshsetmessages: + msg13225
2011-01-14 15:59:17galbollesetfiles: + add-a-__no_record-option-to-rollback.dpatch, unnamed
messages: + msg13511
2011-01-14 16:00:22darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-e573c862456c76765bfdf174e1bec1dcf04c4edf -> http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-7df4b2f12b6fb7361fbf7c6eb7ea83c052aebfe5
2011-01-14 16:18:32darcswatchsetstatus: needs-screening -> needs-review
messages: + msg13513
2011-01-15 00:39:12mornfallsetmessages: + msg13516
2011-02-07 15:41:12ghsetstatus: needs-review -> accepted
messages: + msg13644
2011-03-09 18:35:30darcswatchsetmessages: + msg13781
2011-05-10 19:05:55darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-7df4b2f12b6fb7361fbf7c6eb7ea83c052aebfe5 -> http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-e573c862456c76765bfdf174e1bec1dcf04c4edf
2011-05-10 22:36:02darcswatchsetmessages: + msg14425