[darcs-users] darcs patch: Provide readRecorded in Gorsvet as well. (and 16 more)

Eric Kow kowey at darcs.net
Tue Jul 7 20:39:11 UTC 2009


I've applied most of these, but I haven't yet a chance to look at the
new hashed-storage index patch and if at all possible, I'd like the
third patch to be amended and resent.

I understand that this is likely not going to be practical as it's
already in your darcs-hs branch and may have dependencies on top of
it.  But let me know in case it's possible.

On Mon, Jun 29, 2009 at 04:05:37 +0200, Petr Rockai wrote:
> This is what I think is safe (and mostly desired) for the release. Review would
> be appreciated (especially if we can make this hit mainline soon, so there's
> time between the landing and beta 2).

Provide readRecorded in Gorsvet as well.
----------------------------------------
> +readRecorded :: (RepoPatch p) => Repository p C(r u t) -> IO Tree
> +readRecorded _ = readDarcsPristine "."
> +
>  readRecordedAndPending :: (RepoPatch p) => Repository p C(r u t) -> IO Tree
>  readRecordedAndPending repo = do
> hunk ./src/Darcs/Gorsvet.hs 148
> -  pristine <- readDarcsPristine "."
> +  pristine <- readRecorded repo

Straightforward refactor.

Factor out applyToTree in Gorsvet.
----------------------------------
>  readRecordedAndPending repo = do
>    pristine <- readRecorded repo
>    Sealed pending <- pendingChanges repo []
> -  (_, t) <- virtualTreeIO (apply [] pending) pristine
> -  return t
> +  applyToTree pending pristine

> +applyToTree patch tree = snd `fmap` virtualTreeIO (apply [] patch) tree

Likewise.

Move tentativelyMergePatches and friends to a new module, Repository.Merge.
---------------------------------------------------------------------------
So, it would be helpful for working with David's branch if we could
separate our cabal stuff from the rest of the patches. 

This makes it easier for him to apply our patches without generating yet
another conflict (unfortunately, this would be us running into some of
darcs's weak points - dealing with repeated conflicts in long branches.
I wonder what happens in other systems)

Is it too late to amend and resend?

It may well be a lost cause anyway given the divergence between our two
branches, but if we can avoid problems, let's do it.

Add type signatures to all Darcs.Gorsvet top-level bindings.
------------------------------------------------------------
> +restrictSubpaths :: (RepoPatch p) => Repository p -> [SubPath] -> IO (Tree -> Tree)

These are missing type witnesses.  I'll add them in.

Add type signature for Darcs.Commands.ShowIndex.dump.
Remove unused binding.

Use the new hashed-storage index upgrade functionality.
-------------------------------------------------------
I haven't yet had a chance to look at this.

-------------------------------------------------------------------
Wall policy for Gorsvet's applyToTree.
Add a TODO comment to the inefficient look-for-adds implementation.
Clean up unused imports in WhatsNew.
Bump hashed-storage dependency to 0.3.4.
-------------------------------------------------------------------

No comment.

-- 
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: 197 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090707/1ef35bb6/attachment.pgp>


More information about the darcs-users mailing list