Reputation: 5052
I've cloned the repo listed at https://hackage.haskell.org/package/language-c-0.4.7 as the upstream repo, namely: http://code.haskell.org/language-c.
I've done some hacks and fixes in it, and recorded them as patches.
But then I discovered that if I want to publish them on
http://hub.darcs.net, I need a darcs-2 repo, and the initial one
which I used for cloning was unexpectedly a darcs-1 repo. (Can be checked with darcs show repo
, which doesn't print darcs-2
in the case of a darcs-1
repo.) Moreover,
I've discovered also a language-c
repo at
which looks like an upstream repo:
http://hub.darcs.net/visq/language-c, with a few more fresh changes
there. It is a darcs-2 repo, too, of course.
I could do the conversion to darcs-2, but I read that it is not reproducible and one can't exchange patches between the results of different runs of the conversion.
What is the simplest way to export my several last patches in the darcs-1 repo and apply them in the darcs-2 repo (a clone of http://hub.darcs.net/visq/language-c)?
(As for the question which of http://code.haskell.org/language-c and http://hub.darcs.net/visq/language-c should be considered to be upstream, see https://mail.haskell.org/pipermail/haskell-cafe/2015-December/122545.html, which I hope to get a definitive answer for soon.)
Upvotes: 3
Views: 92
Reputation: 29100
In practice the situation with reproducible conversion is more complicated - and not quite as bad - as the dire warning provided by darcs convert
.
The main issue underlying the warning is that if two repositories have the same patches but in different orders, you might get incompatible patches.
If you rerun the conversion twice in a row on the same repository, you will get the same result. Indeed, as long as you run it on two repositories with exactly the same patches, in the same order, you will get the same result.
Moreover, the conversion is actually "prefix closed": you can have two repositories, and one starts with the the same patches as the other, in the same order, and also has some extra patches at the end. Then converting the two repositories will again result in compatible repositories.
So in your scenario, the main thing you need to do is reproduce the original conversion.
It's very likely it was done from the code.haskell.org
repo and the patches there are still in the same order as they were then - it's rare for them to change order in upstream repos as it only generally happens when someone obliterates patches.
So if you do a fresh get of the code.haskell.org
repo, pull your patches into that, and then do a conversion, you'll probably find that everything is ok. You can then do a get of the new hub.darcs.net
repo, pull the extra converted patches into that, and check that they look ok. Run a darcs check
to be on the safe side.
Upvotes: 2