[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help with mercurial
From: |
John W. Eaton |
Subject: |
Re: help with mercurial |
Date: |
Thu, 20 Jan 2011 15:54:48 -0500 |
On 20-Jan-2011, Jordi Gutiérrez Hermoso wrote:
| On 20 January 2011 05:05, John W. Eaton <address@hidden> wrote:
| > In the past we created separate Mercurial archives for the release
| > branches. That had some advantages, like a very low probability of
| > accidental merges or commits on the wrong branch, no cluttering of the
| > main archive with a branch that few people would be working with. But
| > it also had the big disadvantage of being mostly hidden from view. So
| > I'm thinking of making the release-3-4-x branch a named branch on the
| > savannah archive. I think I know how to do that. But I'd also like
| > to put the older release-3-0-x and release-3-2-x branches there too,
| > both as named branches. Does anyone here know what is needed to do
| > that?
|
| Isn't this what you would like to do?
|
| https://bitbucket.org/brodie/named-branches-example/wiki/Home
|
| I've pointed at this example before, so maybe not.
|
| You're not expecting git-like branches, are you?
I'm not sure what a "git-like branch" is.
| Mercurial branches
| are a bit more permanent than git-branches. What makes sense to me is
| that example, two separate branches, and to use tags to mark releases,
| not a whole separate branch per stable release, especially seeing how
| we don't backport bug fixes to several stable releases, only to the
| last one.
I probably just don't get version control, but to me that doesn't seem
to model what is actually going on, which is that when we make a
release, there is actually a fork in the development. At the end of a
release series, that branch is essentially abandoned. It doesn't make
sense to me to continue with it once the release series is obsolete.
What I want to do with the release-3-0-x and release-3-2-x branches
that we currently have in separate archives is to put them in as named
branches in the archive on savannah. I think I found a way to do
that. In what follows, I use revision numbers, only because I think
it is clearer; I understand that those numbers are not the same in all
copies of an archive.
I have the main archive "octave" and one of the old release archives
"release-3-0-x" in directories side by side. In the main archive,
find the changeset that created the 3-0-0 release, and update to it:
cd octave
hg log
hg update -r 7335
Create a named branch at this point:
hg branch release-3-0-x
In the release archive, find the most recent changeset and the first
changeset made after the release:
cd ../release-3-0-x
hg tip
hg log
Transplant all patches from the release-3-0-x archive from the point
of the release to the most recent into the main archive:
cd ../octave
i=7336
while [[ $i < 7692 ]]; do
hg transplant -s ../octave-release-3-0-x $((i++))
done
Then this can be pushed to another archive with
hg push --new-branch another-archive
jwe