On Mon, Aug 13, 2007 at 09:54:44PM +0200, Eric Kow wrote:
> Miscellaneous.
>
> Note the tag --checkpoint fix. Is that the right thing to do? Shapr noticed
> that darcs tag --checkpoint wasn't having any effect on darcs get --partial.
I see the problem. It's that when I rewrote Tag to use the new Repository
framework, I didn't put in code to break the repository at the new
checkpoint! :( So this isn't *quite* the right fix: in essence, we should
*always* optimizeInventory after tagging. The only catch is that we could
do this more efficiently, since we *know* that we can break on the latest
patch. Still, it's not noticeably inefficient, and this code is clean, we
just should move the optimizeInventory out of the when (Checkpoint `elem` opts).
> [Fix bug in tag --checkpoint.
> Eric Kow <[EMAIL PROTECTED]>**20070813195204
> It was creating the checkpoint, but not updating the inventory.
> ]
> <
> > {
> hunk ./src/Darcs/Commands/Tag.lhs 28
> import Darcs.Utils ( askUser )
> import Darcs.Repository ( amInRepository, withRepoLock, read_repo,
> tentativelyAddPatch, finalizeRepositoryChanges,
> + optimizeInventory,
> )
> import Darcs.Repository.Checkpoint ( write_recorded_checkpoint )
> import Darcs.Patch
> hunk ./src/Darcs/Commands/Tag.lhs 88
> in do
> tentativelyAddPatch repository opts $ adddeps mypatch deps
> finalizeRepositoryChanges repository
> - when (CheckPoint `elem` opts) $ write_recorded_checkpoint repository
> myinfo
> + when (CheckPoint `elem` opts) $ do write_recorded_checkpoint
> repository myinfo
> + optimizeInventory repository
> putStrLn $ "Finished tagging patch '"++name++"'"
> \end{code}
> Each tagged version has a version name.
--
David Roundy
Department of Physics
Oregon State University
_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel