darcs

Patch 74 resolve issue1643: optimize --upgrade should do optimize

Title resolve issue1643: optimize --upgrade should do optimize
Superseder Nosy List christian.berrer, darcs-users, darcswatch, kowey
Related Issues
Status accepted Assigned To
Milestone

Created on 2009-11-15.16:47:53 by christian.berrer, last changed 2011-05-10.22:06:21 by darcswatch.

Files
File name Status Uploaded Type Edit Remove
resolve-issue1643_-optimize-__upgrade-should-do-optimize.dpatch christian.berrer, 2009-11-15.16:47:52 text/x-darcs-patch
unnamed christian.berrer, 2009-11-15.16:47:52 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg9320 (view) Author: christian.berrer Date: 2009-11-15.16:47:52
Sun Nov 15 13:37:16 CET 2009  Christian Berrer <christian.berrer@gmx.at>
  * resolve issue1643: optimize --upgrade should do optimize
Attachments
msg9321 (view) Author: darcswatch Date: 2009-11-15.16:51:03
This patch bundle (with 1 patches), which can be applied to the repository http://darcs.net/ is now tracked on DarcsWatch at http://darcswatch.nomeata.de/repo_http:__darcs.net_.html
msg9335 (view) Author: kowey Date: 2009-11-15.17:44:25
resolve issue1643: optimize --upgrade should do optimize
--------------------------------------------------------
>  optimize_cmd :: [DarcsFlag] -> [String] -> IO ()
> -optimize_cmd opts _ | UpgradeFormat `elem` opts = optimizeUpgradeFormat
> -optimize_cmd origopts _ = withRepoLock opts $- \repository -> do
> +optimize_cmd origopts _ = do
> +    when (UpgradeFormat `elem` origopts) optimizeUpgradeFormat
> +    withRepoLock opts $- \repository -> do

Looks good to me.

Possible future work: I suspect that you could also get a hacky
implementation of http://bugs.darcs.net/issue1642 out of this, but I
guess it's better to do it the way that the ticket above suggests to
avoid doing double work of creating the hashed pristine and then
upgrading it.

Alternatively, people could just do darcs optimize --upgrade --pristine
thanks to your patch...

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
msg9346 (view) Author: darcswatch Date: 2009-11-15.18:00:57
This patch bundle (with 1 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
msg14383 (view) Author: darcswatch Date: 2011-05-10.22:06:21
This patch bundle (with 1 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-1d1d98ad0fe75bb58ebef355b7593693940b9a70
History
Date User Action Args
2009-11-15 16:47:53christian.berrercreate
2009-11-15 16:51:04darcswatchsetnosy: + darcswatch
messages: + msg9321
2009-11-15 17:44:26koweysetnosy: + kowey
messages: + msg9335
2009-11-15 18:00:57darcswatchsetstatus: needs-review -> accepted
messages: + msg9346
2011-05-10 22:06:21darcswatchsetmessages: + msg14383