[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Lithe Branching
From: |
John Meinel |
Subject: |
Re: [Gnu-arch-users] Lithe Branching |
Date: |
Sat, 09 Oct 2004 12:22:56 -0500 |
User-agent: |
Mozilla Thunderbird 0.8 (Windows/20040913) |
address@hidden wrote:
I have branches stable for merging, dev1 for developer A
and dev2 belonging to developer B.
I can easily 'tla get $stable' to run alternate test star-merges
of dev1 and dev2, or both combined.
But can I easily create an archive of stable+dev1, to then
star-merge in dev2, so I can easily test if it is worth
doing just such a star merge at this point, in that sequence,
or discover it is perhaps better to firstly commit dev2 first,
then star-merge in dev1 (possibly so dev1 can make further
changes)?
Well, are you just testing if the merge works? Why do you need a branch
for that. Just:
tla get $stable test-stable
cd test-stable
tla star-merge $dev1
#make sure everything is okay
tla star-merge $dev2
# See if everything is okay.
# This gets a little tricky, but it might be what you want
# It creates a branch, and then changes you working directory
# to that branch. In aba it is just "aba branch-this"
tla tag -S $stable cat--stable-withdev
tla sync-tree cat--stable-withdev--base-0
tla set-tree-version cat--stable-withdev--base-0
# Now the merge of both branches is on a branch. You could have
# Committed to the main branch if you wanted.
tla commit
I am now comfortable with tla get to provide ready access to
working trees, but am not sure about readily throwing around
temporary trees at a higher level (with commits and all), in
order to test in that different way. So is it possible/ easy?
My experience with Bitkeeper was that such things are _really_
simple - "bk clone src(dir/archive) dst(dir/archive)", which
is essentially just cp -r src dst, since history is within
the working tree.
This Bitkeeper approach is what I am terming "lithe branching"
for the purposes of this email, and is a concept that I think
would be well worth making clear how to do - I believe it's a
powerful tool for developers to get to know.
If you truly want to do things on a test branch, you could just do:
tla tag -S $stable $stable-test
tla get $stable-test stable-test
cd stable-test
tla star-merge --reference $stable $dev1
# Play play
tla commit
tla star-merge --reference $stable $dev2
# Play
tla commit.
Note that the tla tag -S doesn't create any data in the repository. It
just creates a new branch name, which is a CONTINUATION of the previous
branch. So it is a cheap operations. The "commit"s will only commit new
changes, so again, pretty cheap.
Thanks in advance
Zenaan
I suppose you could also do all of this with a throwaway archive, but I
wouldn't recommend it.
John
=:->
signature.asc
Description: OpenPGP digital signature