[darcs-users] Re: [Haskell-cafe] fptools in darcs now available

Nimrod A. Abing nimrod.abing at gmail.com
Mon May 2 15:53:27 UTC 2005


On 02 May 2005 14:44:17 +0200, Albert Reiner <areiner at tph.tuwien.ac.at> wrote:
> ["Nimrod A. Abing" <nimrod.abing at gmail.com>, Mon, 2 May 2005 06:01:27 +0000]:
> > 6. No need to wrap your brain around "branches". If you want to make
> > some radical changes to a stable repository, tag your stable
> > repository, do a darcs get to a different directory, make your
> > changes, test them, go crazy. If all goes well, create a patch bundle
> > and apply it to your stable tree.
> 
> What is the tag here good for?  I have been using darcs in pretty much
> that way, but I never even thought about using `darcs tag` and have
> never missed it.
> 
> Is there any downside to not tagging?

Actually no. But there is an "upside" to it :) I use tags to make it
easier to revert to a certain state in a repository if needed. If I do
decide to merge the funky changes to the stable repository, I can
safely pull the old stable version.

For example, I want to try different shadowing techniques on a more or
less stable 3D game project. After tagging the stable branch, I do a
"darcs get" and work in my modulative stencil shadow technique. I
think it works great and merge it with my "main" repository.

Later on I find out that using the modulative stencil shadow
technique, the game drops a lot of frames in certain levels. So I
think I would get better framerates with texture-based shadows, but
don't want to throw away the stencil shadow version yet. So again I do
a "darcs get", this time I use the tag to get the old stable branch
*without* the stencil shadow patches. Work in my texture-based shadows
and get better frame rates this time. But wait, if I merge in my new
version with the "main" repository I will get a lot of conflicts and I
have to manage all of them! But darcs makes it easy: just rename the
"main" repository into say, mygame-stencil-shadows. Then move the
texture-based shadows version to the old location of your "main"
repository and give it the old name of the "main" repository.

I get two "branches" that contain the same thing up to the stable tag
you made before the changes. I don't really care if I have redundant
copies (it's a Good Thing really). Who needs "cheap branches" when you
have cheap diskspace these days? And it would (should?) be possible to
"exchange" patches between the two "branches" though I have not tried
that yet.

It is this sort of flexibility with repositories that I really like
about darcs. It seems to adapt itself well to the strangest uses that
I can think of.

BTW, I did not make that example up :)
-- 
_nimrod_a_abing_

v1sw5CPJYUhw5ln3pr8OUSck6ma8u7LBw3DWNTm5g/l7DaIs7Rr4e6t5Xb4Op1en3g5RZAHC




More information about the darcs-users mailing list