[darcs-users] upgrade from darcs-1 to darcs-2

Ben Franksen ben.franksen at online.de
Sat Mar 7 18:56:47 UTC 2015


Henning Thielemann wrote:
> On Wed, 4 Mar 2015, Simon Michael wrote:
> 
>> On this: it's great that Ganesh is willing to code it up, but I find it
>> hard to be enthusiastic. hub.darcs.net is a service I offer for free,
>> dev/ops time is always scarce and I doubt that perpetuating the oldest
>> data formats is the best use of my & our energy. IMHO this will just
>> increase the surface area for bugs and weird operational issues that
>> will need to be dealt with, for ever.
> 
> As far as I understand darcs will continue to support darcs-1 hashed
> format anyway. I do not know how complicated support for hashed format in
> darcsden is. I even wouldn't be sad, if support for hashed format is
> restricted, e.g. it's ok for me if inspecting changes via
> http://hub.darcs.net does not work for hashed format. But maybe the
> complication is just caused by supporting more than one format. And maybe
> this complication comes anyway, if a darcs-3 format is introduced in a
> shiny future?

Probably, yes.

>> In fact I've always thought that part of hub.darcs.net's value would be
>> to once and for all, FINALLY provide a good reason for the last
>> hold-outs to upgrade their repos away from the
>> exponential-bug-vulnerable old-fashioned format which has besmirched
>> darcs' reputation for so long.

After a few mostly failed attempts at converting darcs-1 repos with more 
than one existing branch, I found that I can live perfectly well with *not* 
converting repos to darcs-2 format. Instead, I merely upgraded old-fashioned 
repos to darcs-1-hashed (which, BTW, happens automatically when you darcs 
get, IIRC since version 2.8, but can also be done inside an existing repo).

It should also be noted that the new (not yet released) rebase feature makes 
it easy to (mostly) avoid conflicts in public (shared) repos. Since I 
usually avoid conflicts, I seldom notice any difference between darcs-1 and 
darcs-2 formats.

> My last state of knowledge is that the exponential merge time bug is not
> gone with darcs-2, it only occurs in different situations, right? 

Exponential merge time can still hit you but it is said to occur less often.

> Thus I
> deferred updating my repositories so far. If the exponential merge problem
> is finally resolved I would reconsider converting my repos.

I can fully understand your reservations. The more so since darcs-2 patches 
currently do not satisfy all the properties we'd like them to satisfy 
(permutivity, or at least "consistency of failure", can be violated in some 
corner cases).

I would support Michael's position *if* we could honestly claim that darcs-2 
patch format is solving all the merge problems and has all the desired 
properties, and if we had at least a decent story for conversion of multi-
branched repos.

Regarding conversion: we can and must do better than offer just a one-time 
conversion of a single branch. Here is a sketch of a solution I'd say would 
be "good enough": When converting a repo for the first time (the first 
branch), we create a "map file" (similar in spirit, but not quite the same 
as a git marks file) that associates old patches with new patches (more 
precisely: old with new patch hashes). When converting another branch, the 
conversion can read an existing map file, pull already converted patches 
from one or more converted repos, and only convert those patches that are 
not yet in the map file, thereby extending it with additional old-hash-new-
hash-pairs.

We could still add a feature like this for the darcs-1 to darcs-2 
conversion. This would not be a wasted effort if we do it right: large parts 
of the code could be re-used for a future upgrade to darcs-3 format. So 
perhaps our precious developer time would be more valuably spent on fixing 
the conversion (possibly along the lines indicated above), rather than 
supporting darcs-1 format in hub.darcs.net?

Cheers
Ben



More information about the darcs-users mailing list