Contact Us

Screencast #1: Using vendor branching and CakePHP

Posted on 17/6/07 by Felix Geisendörfer

Hi folks,

a long time ago I promised to do a screencast on unit testing. So as I sat down and tried to record it I noticed that it was quite an ambitious project. If you've never tried it then let me tell you: Doing a good screen cast is difficult. I've got deep respect for the people capable of doing so and I am in no way feeling qualified to join their league as of right now ; ). So I ended up giving up on the unit testing screencast for now and decided to start with something easier to get some experience first before trying to do difficult programming and entertaining talk at the same time as my early results where disastrous ... ^^.

So here I go with my very first screencast to be published. The topic is how to use vendor branching with CakePHP which is one of many ways to keep your CakePHP version up to date.

To follow this screencast and try things at home you'll need:

  • Windows OS (Sorry my dear Linux + Mac users, crank up your emulators)
  • TortoiseSVN: The best subversion client there is, download here.
  • Basic SVN knowledge, tolerance for my German accent and localized version of Windows
  • Most likely have to leave your RSS reader and visit this post directly

Feedback is welcome and I recommend you to watch in fullscreen mode as the screencast was recorded in 800x600 and I only had room for 720x540 here on my blog.

So here comes the screencast (16:45 minutes, 120 MB):

The player will show in this paragraph

If you want to download the FLV file, please use this link: Download screencast

-- Felix Geisendörfer aka the_undefined


You can skip to the end and add a comment.

snowdog said on Jun 17, 2007:

Good job Felix, really nice screen cast

Beth  said on Jun 18, 2007:

Hi Felix,

Thanks for the creating the screencast :)

BTW, what software are you using to create your screencasts?



Felix Geisendörfer said on Jun 18, 2007:

Hi Beth,

good that you ask. I was looking around for quite a while before I was able to come up with this entirely free tool chain for screencasting:

1. CamStudio: Records the cast as an AVI file
2. Riva FLV Encoder: Turns the AVI into streamable FLV

3. Flash Media Player: Embeds into this site and streams the video

4. WordTube: WordPress plugin that eases managing and embedding screencasts

Hope that helps,
Felix said on Jun 18, 2007:

Felix Geisendörfer's Blog: Screencast #1: Using vendor branching and CakePHP...


[...] Felix Geisendorfer has a new post today showing off an example of his screencasting abilities. Specifically, the video looks at using vendor branching to keep your CakePHP installation up to date. So here I go with my very first screencast to be published. The topic is how to use vendor branching with CakePHP which is one of many ways to keep your CakePHP version up to date. [...]

Drayen said on Jun 18, 2007:

Really nicely done, thanks!

Tim Koschuetzki said on Jun 18, 2007:

Well done Felix, thank you. :)

[...] Hop on over and see it now. Bookmark: These icons link to social bookmarking sites where readers can share and discover new web pages. [...]

Beth  said on Jun 18, 2007:

Hi Felix,

Thanks for sharing the screencasting links ;)

Travis Cline  said on Jun 19, 2007:

Hi Felix, Nice screencast, needs some more cli-action though ;)

The way you push the new drops on your vendor branch strays a bit from best practice -- imagine files that are deleted, renamed or moved in the vendor's repository.

While in many cases such wouldn't break a system, it is possible. For some environments having a completely accurate representation can be important.

svn devs provide a perl helper called svn_load_dirs :
Usage is explained in the book here:

Another (nicer, IMO) alternative is instead of just pulling another export from the cake repo or dealing with svn_load_dirs, to merge between the revision of your current and :HEAD up live.

(e.g. "svn merge -r5146:HEAD ./current" -- then svn ci, svn cp)

If you're feeling really ambitious and don't want to possibly preserve local core modifications you could just merge in such a way right onto your wc.

Anyhow, sorry so long, don't mean to be a drag.


Felix Geisendörfer said on Jun 19, 2007:

Travis, thanks for your comment. Yes, I know about svn_load_dirs and the imperfection of the method presented here. However I had actually forgotten about all of it after having never had problems with my simplified work flow ; ).

Anyway, I do like your idea of directly merging changes from the svn repository, this seems kind of cool. However, you'll always have to remember what revision you updated to the last time this way or at least note it in the log messages ; ).

So thanks for mentioning those details, they can be important depending on what one does.

-- Felix

Grant Cox  said on Jun 20, 2007:

Thanks for the screencast Felix. I've seen you (and others) mention vendor branching a few times, but it always seemed very complex. And watching your screencast, it is!

But I can certainly see the advantages - currently I'm using a svn:export, which means my app repository doesn't actually include the the CakePHP core, doesn't automatically store my core changes, and doesn't update the app files when they change in the core. So I can see in the near future I need to update to using a vendor branch - and your screencast will certainly help me with that :)

Felix Geisendörfer said on Jun 20, 2007:

Grant: It's not all that complex, it's just a process involving a couple of steps, but as they are always the same it's not that difficult. If you find the overhead that comes with it too big you can also easily automate the process using some CL scripting ; ).

Derick  said on Jun 20, 2007:

Wonderful screencast, have been thinking of how to SVN my project for a while and this just introduces yet another option. Especially when I do hack a little into CakePHP's core when there are bugs which I have to submit a ticket for and then wait for the actual update before removing my "hack".

For the current setup, do you create another app folder (differently named) in the trunk for your actual project folder? The other question is, why do we put all the folders in trunk instead of just the project folder (not necessary named "app"). I mean we can check out the vendor separately right? Or is it such that the lead can actually decide which CakePHP revision the trunk should hold.

I think I will need to try and get hold of you on IRC man. :p

Lucian Lature  said on Jun 22, 2007:

Hi Felix!...Great post.

However, check , pls. My Thunderbird stopped updating the feeds :D

Thank you very much!

Felix Geisendörfer said on Jun 24, 2007:

Derick: I always keep all my project files (/app, /cake, /vendors) under SVN control. I don't run more then one project per /cake core. This has worked the best for me in the past but you're free to do things differently ; ).

Lucian: Will have to investigate on that. I think the WP plugin for the screencast set's an enclosure without length property. May not be easy / soon fixed.

[...] Some unrelated news: I don't know how many unique downloads my svn screencast received but my stats say it swallowed around 250 GB in traffic which is sort of nuts. When I found out about it I was kind of scared for a second but then remembered that I recently upgraded my web hosting plan to one where I have unlimited traffic - which saved me 100 euros in bandwidth fees ; ). [...]

Mladen Mihajlovic  said on Jul 03, 2007:

"Travis, thanks for your comment. Yes, I know about svn_load_dirs and the imperfection of the method presented here. However I had actually forgotten about all of it after having never had problems with my simplified work flow ; )."

The only problem would be files that were removed from the current cake repository. Those files would still be available in your cakephp\current repository as all you do is copy new files over existing files.

Felix Geisendörfer said on Jul 03, 2007:

Mladen: Yes, this is part of what Travis said. Anything you'd like to add? ; )

Lijeesh said on Nov 01, 2007:

hi, we have good alternative for tortoise svn in Linux in KDE, kdesvn. using xvidcap we can capture screen also. Number of tools to create flv is also there.

Neil Crookes said on Mar 19, 2008:

Hi Felix, its Neil from CakeFest here. I'm interested in setting this up, but wanted to use the solution suggested by Travis, but I'm not sure of the specifics, do you know of any resources that explain this further?

Felix Geisendörfer said on Apr 09, 2008:

Neil: Contact me via one of the IMs listed here: and I'll help you with the setup.

Sorry for the late reply, I was on a asia trip with limited computer time for the past weeks.

Michael  said on May 14, 2009:

Thanks for this screencast. I was also looking into svn:externals. As far as I can tell a drawback for the approach you are using is that any overrides to the vendor library would be available for that project only. Any thoughts to making/maintaining a vendor copy and then having multiple projects point at that revised vendor copy?

newbie in cake  said on Jun 29, 2009:

felix i want to ask you about adding video in my cake website...
can you explain step by step.. how to add video player in our cake website???

thaks before

This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.