[darcs-users] darcs patch: TreeIO is smart enough now to unfold as ... (and 3 more)
Eric Kow
kowey at darcs.net
Wed Jun 3 21:35:17 UTC 2009
Hi Florent,
Is it too early for me to try you as a reviewer? I realise there may be
a bit of catching up, i.e. getting to know the Darcs.Gorsvet module,
which is why I'm trying to catch all potential reviewers early :-)
Thanks!
On Wed, Jun 03, 2009 at 22:59:22 +0200, Petr Rockai wrote:
> Hi,
>
> nothing big in this bundle, but please take either all or nothing of 1 2 4,
> otherwise things will probably break. 3 is fairly independent.
>
> Yours,
> Petr.
>
> PS: Hopefully, hashed-storage 0.3.2 will now install on 6.8 properly (didn't
> quite work out with 0.3.1)...
>
> Thu May 28 15:21:44 CEST 2009 Petr Rockai <me at mornfall.net>
> * TreeIO is smart enough now to unfold as needed.
>
> Wed Jun 3 22:36:31 CEST 2009 Petr Rockai <me at mornfall.net>
> * We need to unfold the pristine Tree before rebuilding the index.
>
> Wed Jun 3 22:37:02 CEST 2009 Petr Rockai <me at mornfall.net>
> * Fix index invalidation in the move command.
>
> Wed Jun 3 22:54:39 CEST 2009 Petr Rockai <me at mornfall.net>
> * Bump the hashed-storage dependency to >= 0.3.2.
TreeIO is smart enough now to unfold as needed.
-----------------------------------------------
> Petr Rockai <me at mornfall.net>**20090528132144
> Ignore-this: 3bb04ec990bb1299b3b521bfa2f476e6
> ] hunk ./src/Darcs/Gorsvet.hs 206
> where nodarcs (AnchoredPath (Name x:_)) _ | x == BS.pack "_darcs" = False
> nodarcs _ _ = True
>
> --- XXX both application actions below could avoid unfolding if TreeIO would be
> --- smart enough to unfold-as-needed...
> applyToTentativePristine _ patches =
> hunk ./src/Darcs/Gorsvet.hs 207
> - do pristine <- readDarcsPristine "." >>= unfold
> + do pristine <- readDarcsPristine "."
> (_, tree) <- hashedTreeIO (apply [] patches)
> pristine "_darcs/pristine.hashed"
> BS.writeFile "_darcs/tentative_pristine" $
> hunk ./src/Darcs/Gorsvet.hs 217
> applyToWorking :: (RepoPatch p) => Repository p C(r u t)
> -> Sealed (FL Prim C(u)) -> IO Tree
> applyToWorking _ (Sealed patches) =
> - do pristine <- readDarcsPristine "." >>= unfold
> + do pristine <- readDarcsPristine "."
> working <- readIndex
> snd `fmap` plainTreeIO (apply [] patches) working "."
>
We need to unfold the pristine Tree before rebuilding the index.
----------------------------------------------------------------
> Petr Rockai <me at mornfall.net>**20090603203631
> Ignore-this: a7501a0d75c5596d91bc7ee96f5895f9
> ] hunk ./src/Darcs/Gorsvet.hs 251
> when invalid $ removeFile "_darcs/index_invalid"
>
> updateIndex repo = do
> - pristine <- readRecordedAndPending repo
> + pristine <- readRecordedAndPending repo >>= unfold
> updateIndexFrom pristine >>= unfold
> return ()
>
Fix index invalidation in the move command.
-------------------------------------------
> Petr Rockai <me at mornfall.net>**20090603203702
> Ignore-this: e2fa46552a1ac28aea587c96c0932298
> ] hunk ./src/Darcs/Commands/Move.lhs 96
> work <- slurp "."
> let old_fp = toFilePath old
> new_fp = toFilePath new
> - invalidateIndex repository
> if slurp_hasdir (sp2fn new) work && slurp_has old_fp work
> then move_to_dir repository opts [old_fp] new_fp
> else do
> hunk ./src/Darcs/Commands/Move.lhs 101
> cur <- slurp_pending repository
> addpatch <- check_new_and_old_filenames opts cur work (old_fp,new_fp)
> + invalidateIndex repository
> withSignalsBlocked $ do
> case addpatch of
> Nothing -> add_to_pending repository (Darcs.Patch.move old_fp new_fp :>: NilFL)
> hunk ./src/Darcs/Commands/Move.lhs 124
> cur <- slurp_pending repository
> work <- slurp "."
> addpatches <- mapM (check_new_and_old_filenames opts cur work) $ zip moved movetargets
> + invalidateIndex repository
> withSignalsBlocked $ do
> add_to_pending repository $ unsafeFL $ catMaybes addpatches ++ movepatches
> zipWithM_ (move_file_or_dir work) moved movetargets
Bump the hashed-storage dependency to >= 0.3.2.
-----------------------------------------------
> Petr Rockai <me at mornfall.net>**20090603205439
> Ignore-this: c64b84b9002e57a9926d86f8b5d1e69b
> ] hunk ./darcs.cabal 318
> html == 1.0.*,
> filepath == 1.1.*,
> haskeline >= 0.6.1 && < 0.7,
> - hashed-storage >= 0.3 && < 0.4
> + hashed-storage >= 0.3.2 && < 0.4
>
> if !os(windows)
> build-depends: unix >= 1.0 && < 2.4
>
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090603/d940a834/attachment.pgp>
More information about the darcs-users
mailing list