Hi all, Kiln/Mercurial newbie here, working through the doc on this site and the various helpful resources out there on DVCS and this implementation of it. Background is Subversion/other centralized SVC, so bear with as I pose an architecture question that no post I can find here seems to address.
Assume a basic Stable/Dev subrepository architecture as posited in the last page of Joel's tutorial. (I quibble with Stable > Dev direction, even after lucid illustrations like this one, but that's perhaps for another post.) So I have a Stable pushed to by multiple developers as we finish up a build to release it, and a Dev(el) pushed to by multiple developers, not necessarily the same, as we press on with the future of our work. Since I am so far Stable/Dev Dev/Stable agnostic, I will pose this problem both ways:
A Stable developer fixes two bugs in a pre-release version of Stable, while other Dev developers press on with the unrelated future. Turns out that BugFix1 is 100% obviated by a refactor on the Dev side, and has no push "destination"; BugFix2 remains relevant. Accordingly, when the Dev devs pull (or the Stable devs push), only one changeset, the latter should move from Stable to Dev.
A buncha crack Dev developers add New Features x, y, z, and z-prime, then find a stupid bug that also applies to Stable, in a file otherwise untouched by x, y, z, and z-prime. How do they push that one fix only to Stable, despite its succeeding a buncha changesets that Stable should not get?
I hope this is a really dumb question reflecting my ignorance, and that some obvious feature of Mercurial resolves this, but honestly, every example of merging subrepositories I've seen is based on examples far too simplistic for such all-too-common real world examples. (This one requires approximately 2 developers working on both branches for maybe 3 hours.) I know that in the best practices of my past centralized SVC experience, the only way to handle a "cherry-picked" (huge non-fan of that term) bug fix across a Stable and a Dev was to apply it as a revision (ack!) in both places, but there's all this talk about Mercurial's magical merging abilities... Can it merge a single changeset to a different changeset timeline, regardless of predecessors? Isn't that two unlike states, and doesn't it fail just like a centralized SVC would? How does distributed help here?