Ganesh Sittampalam <[email protected]> writes: Resolve issue1942: fix the fix which ended up too strict due to unsealing. -------------------------------------------------------------------------- > Dmitry Astapov <[email protected]>**20100911185355 > Ignore-this: 87012509b3c1c0137306b348ae585059 > (manually backpopting fix by Petr Rockai to mainline) > ] hunk ./src/Darcs/Repository/DarcsRepo.lhs 108 > import Darcs.Utils ( catchall ) > import Darcs.ProgressPatches ( progressFL ) > import Printer ( text, (<>), Doc, ($$), empty ) > -import Darcs.Witnesses.Sealed ( Sealed(Sealed), seal, unseal ) > +import Darcs.Witnesses.Sealed ( Sealed(Sealed), seal, unseal, mapSeal ) > > #include "impossible.h" > \end{code} > hunk ./src/Darcs/Repository/DarcsRepo.lhs 315 > parse2 :: RepoPatch p => PatchInfo -> FilePath > -> IO (Sealed (PatchInfoAnd p C(x))) > parse2 i fn = do ps <- unsafeInterleaveIO $ gzFetchFilePS fn > Cachable > - Sealed p <- return $ hopefullyNoParseError > (toPath fn) (readPatch ps) > - return $ seal $ patchInfoAndPatch i p > + return $ patchInfoAndPatch i > + `mapSeal` hopefullyNoParseError (toPath fn) > (readPatch ps) > hopefullyNoParseError :: String -> Maybe (Sealed (Named a1dr > C(x)), b) > -> Sealed (Hopefully (Named a1dr) C(x)) > hopefullyNoParseError _ (Just (Sealed x, _)) = seal $ actually x
Not a new patch, although I am not sure about it's review status. write out tag before trying to optimize inventory ------------------------------------------------- > Ganesh Sittampalam <[email protected]>**20101004054713 > Ignore-this: aebf3d7ace08cce188501432653fd2b7 > This fixes 'darcs tag' for old-fashioned repos. > The original code seems obviously wrong, so it's hard to understand > why things only started breaking after this patch: > > Sat Sep 11 19:53:55 BST 2010 Dmitry Astapov <[email protected]> > * Resolve issue1942: fix the fix which ended up too strict due to > unsealing. > (manually backpopting fix by Petr Rockai to mainline) > > ] hunk ./src/Darcs/Repository/DarcsRepo.lhs 193 > addToTentativeInventory compr p = > do appendDocBinFile (darcsdir++"/tentative_inventory") $ text "\n" > <> showPatchInfo (patch2patchinfo p) > + res <- writePatch compr p > when (isTag $ patch2patchinfo p) $ > do debugMessage "Optimizing the tentative inventory, since we're > adding a tag." > realdir <- toPath `fmap` ioAbsoluteOrRemote "." > hunk ./src/Darcs/Repository/DarcsRepo.lhs 202 > Sealed ps <- readRepoPrivate k realdir "tentative_inventory" > :: IO (SealedPatchSet p C(Origin) ) > simplyWriteInventory "tentative_inventory" "." $ > slightlyOptimizePatchset ps > - writePatch compr p > + return res > > addToTentativePristine :: Effect p => p C(x y) -> IO () > addToTentativePristine p = The patch looks OK to me. Please do push if it passes tests (assuming the first patch is OK). Yours, Petr. _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
