[darcs-users] is this a legitimate way to convert from v1 to v2?
Eric Kow
kowey at darcs.net
Mon Aug 30 09:15:11 UTC 2010
I think it would be helpful if somebody else chimed in to give a second
opinion :-)
[I'm leaving most of your post intact for convenience of said second
opinion... anyone?]
On Fri, Aug 27, 2010 at 10:25:05 -0700, Lev Lvovsky wrote:
> This really clarifies things, and assuming I understand this
> explanation, it seems like our upgrade path is a safe one. To detail
> it a little bit more:
>
> 1. We have one darcs1 repository that all of our developers push to
> once the patches have been OK'd. Let's call it "production.v1".
> 2. We all maintain branches off of "production.v1" where we test our
> own additional bits of code before pushing back onto "production.v1".
> Let's call the first "production-branch-1.v1", and the second
> "production-branch-2.v1". These two branches could have been get'd at
> different times, and therefore will likely have differing subsets of
> "production.v1". It goes without saying that they have completely
> different supersets from "production.v1"
> 3. Prior to the darcs upgrade, it's possible that either
> "production-branch-1.v1" or "production-branch-2.v1" may have pulled
> from "production.v1" to get additional patches which were committed to
> "production.v1" in the intervening time. Since we haven't upgraded
> darcs yet, these commuted patches relative to each branch aren't a
> problem for darcs to deal with in the case that we want to push
> between the branches.
>
> Upgrade from darcs1 to darcs2:
> 4. Convert "production.v1". Let's call it "production.v2"
> 5. Convert branches. They're temporary, let's call them
> "production-branch-1.v2_tmp", and the second
> "production-branch-2.v2_tmp"
> 6. 'Get' a copy of "production.v2" for each branch which we have.
> Let's call them "production-branch-1.v2", and "production-branch-2.v2"
> 7. For each of the temporary branches from step 5, we do an email
> send to each of the corresponding production branches we've made in
> step 6. I'm not sure whether there's any functional difference between
> an email and a 'push', if there's not, just assume a push.
Pushing and sending+apply have the same effect.
Push much like something like a send to create a patch bundle
and then invokes darcs apply on the remote end.
> 8. At this point, both branches production-branch-1.v2", and
> "production-branch-2.v2" are both ordered the same in relation to one
> another. "production" is first, and all additional patches come
> after.
Modulo patches unique to each branch you mean.
> 9. Remove the temporary converted branches created in step 5, we're
> only to use the branches from step 6.
>
> I realize this may not suit everyone's needs, and it may be flawed in
> the fact that there may have been commuted patches between the branch
> conversion relative to the production conversion, however in our case,
> darcs hasn't complained. Our repository is medium-sized, with
> approximately 12k patches. I'm attaching a script which we used for
> the conversion in case all of this is not clear. Who knows, it may
> help someone out there...
Well, if you're concerned about the problem of commute(convert) not
being the same as convert(commute), you might be a bit wary of doing
this, and I'm not sure "darcs hasn't complained" is really good enough.
And if you have a script to automate this, it sounds like it shouldn't
be too much trouble to do #6 and #7 before #4 and #5 (that is, use
get and push to ensure that you have the patches in a compatible order)
That said, I was probably also being a little too pessimistic: while I
said something like
BAD: c1 c2 c3 m1 m2 c4 (potentially problematic c4)
GOOD: c1 c2 c3 c4 m1 m2
I should probably add that converting from a repo with the common
patches still in front but commuted out of order is probably fine
on the grounds that commuting patches always results in the same
state
PROBABLY OK: c1 c4 c3 c2 m1 m2
Also, I think that if you don't have any conflicts between the
branches or the branch and the main repo then what you did should be OK.
That said, you should also be careful that I don't really know the
conversion process, so I'm not sure I'm thinking very carefully about
the implications of all this, so you may want to hear another opinion
first.
Sorry for the fuzziness
Thanks,
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:kowey at jabber.fr (Jabber or Google Talk only)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100830/06d6c0fb/attachment.pgp>
More information about the darcs-users
mailing list