There's no functionality built in, so the other answer would work perfectly; I might say that you should attach it to the default execution chain somehow, I would recommend something like
after :deploy, :mark_revision
of better still imho would be something like:
after :deploy do
log = "#{deploy_to}/revisions.log"
run "(test -e #{log} || touch #{log} && chmod 666 #{log}) && " +
"echo #{latest_revision} >> #{log};"
end
I've opened it as a ticket for discussion on Capistrano's bug tracker, maybe we'll implement something in the core to keep better logs; it's certainly a great question we've harshly overlooked!
Peritor Labs'"Webistrano"does something similar, by keeping a database driven web-front end, this allows you to log whatever you like, and move the dependency for deployment off the developer machines to somewhere more central; often people use Webistrano on their CI server, or repository host if they are self-hosting. More info on their Trac: http://labs.peritor.com/webistrano
The bug resides here: https://capistrano.lighthouseapp.com/projects/8716-capistrano/tickets/98-log-deployments