I do that with mercurial (HG) I have web2py folder as an hg repo, when a new version of web2py is released I pull my web2py folder to the current release, in development I always work with trunk.
Inside applications folder I have one HG repo for each application, on development I push that to bitbucket, then on my production server I just pull the specific application. Note that web2py can work with applications on different folder, you can have apps in /home/myapplications and web2py in /var/web2py. -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ]