[darcs-devel] [patch1731] store rebase patch at the repo layer
Ben Franksen
bugs at darcs.net
Fri Sep 21 06:35:55 UTC 2018
New submission from Ben Franksen <ben.franksen at online.de>:
As announced on @darcs-devel here is my bundle for the rebase-storage
refactor. Note this doesn't touch the internal workings of rebase at all. It
is purely about how the rebase patch is stored in the repo. The on-disk
format is exactly the same as before, minus the meta data.
TODO: give the remains of Darcs.Patch.Named.Wrapped a better name and place
in the module hierarchy.
8 patches for repository http://darcs.net/screened:
patch 288d5f53f83e2fd1b72e66a0c37f4c729b531ef0
Author: Ben Franksen <ben.franksen at online.de>
Date: Mon Jul 2 18:58:26 CEST 2018
* move more repo paths to D.R.Paths
patch 5aa080f8f1bf87912d49ef4803a1f8ef07f14ef0
Author: Ben Franksen <ben.franksen at online.de>
Date: Tue Sep 18 19:00:40 CEST 2018
* store rebase patch at the repo layer instead of mixing it with normal patches
This does not yet do away with the WrappedNamed layer and the
RepoType/PatchType cruft, which will be done in a second and third step.
Some tests now fail which is due to bugs which are only weakly related to
the change made here, so will be fixed in a follow-up patch.
Note that this changes is incompatible in that previous versions of darcs
can't handle a repo with a new-style rebase in progress and vice versa. This
is something we cannot avoid unless we keep all the old code around, which
would reap us us of most of the benefits we get from this change.
patch f0e13101eb205765ade027749c5af445e79e5580
Author: Ben Franksen <ben.franksen at online.de>
Date: Tue Sep 18 04:10:46 CEST 2018
* two fixes in clone and convert import commands
The bug was in both cases that finalizeRepositoryChanges was not correctly
paired with revertRepositoryChanges. This was exposed by the new way of
storing the rebase patch, which crashes when it tries to rename the
tentative rebase patch back to its final version.
patch cb9d99d39ac946fbbb931464c24154be80e05290
Author: Ben Franksen <ben.franksen at online.de>
Date: Tue Sep 18 19:13:23 CEST 2018
* remove the WrappedNamed layer
patch 404143fadc2551ac409bdf850d9a10f7075cd939
Author: Ben Franksen <ben.franksen at online.de>
Date: Wed Sep 19 11:56:55 CEST 2018
* add PatchInfoAndG which is polymorphic in the named patch type
The standard PatchInfoAnd is now a type synonym that fixes the named patch
type as 'Named'. Unfortunately this required the addition of Eq2 constraints
in lots of places.
The goal of this generalization is to be able to convert old-style rebasing
repos, for which we need to read PatchInfoAndG with a simplified version of
the old WrappedNamed as the named patch type.
patch efa36333ad5e9073488930c0dd9912b47c68bb23
Author: Ben Franksen <ben.franksen at online.de>
Date: Thu Sep 20 01:10:29 CEST 2018
* use englishNum for correct grammar in rebase status line
patch 49d7d124a3bd725dff62d22f989679fdef4dc30c
Author: Ben Franksen <ben.franksen at online.de>
Date: Wed Sep 19 22:11:51 CEST 2018
* add command 'rebase upgrade'
This required a few additional refactorings mostly in D.R.Hashed. We lift a
local function to the top level that (lazily) reads the patches from a
single inventory. Since this does not return a PatchSet but only an RL of
PatchInfoAnd, we can generalize it to return PatchInfoAndG and so can be
used with WrappedNamed instead of Named. The WrappedNamed has been
resurrected and largely cut down to what is needed for this single purpose.
patch 4a12994d2b9d97fd0b81b87014a4ead7c0f95223
Author: Ben Franksen <ben.franksen at online.de>
Date: Thu Sep 20 15:56:15 CEST 2018
* reliably fail if we detect that an old-style rebase is in progress
The trick is to check if the repo type is tagged with SIsRebase, which means
that the repo format has rebase-in-progress, and then count the suspended
patches in the new-style rebase patch. If it is zero we can assume that we
have an old-style rebase in progress.
While the check itself is simple, making sure it is called with the right
parameters at the right time is not. One problem is that we must make an
exception for the 'rebase upgrade' command. This is achieved by adding a new
kind of RepoJob (OldRebaseJob) just for this command. A further complication
arises because startRebaseJob is called with an SIsRebase-typed repo
regardless of whether a rebase was in progress initially or not. In this
case we cannot decide whether to run the check based on the repo type alone,
but instead have to (re-)test the format stored in repository token.
----------
files: move-more-repo-paths-to-d_r_paths.dpatch, patch-preview.txt, unnamed
messages: 20316
nosy: bf
status: needs-screening
title: store rebase patch at the repo layer
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1731>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 130735 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20180921/98e61602/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: move-more-repo-paths-to-d_r_paths.dpatch
Type: application/x-darcs-patch
Size: 144911 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20180921/98e61602/attachment-0003.bin>
-------------- next part --------------
.
More information about the darcs-devel
mailing list