However using ‘wget’ with Code Collaborator has always been tricky, because you have to log in to the server with form-based authentication. There’s a hack to get around this which involves saving a cookie and then invoking ‘wget’ and supplying the cookie using a header… it’s a mess.
To ease this pain in Code Collaborator 5.0.5025 I added a command to our command-line called ‘ccollab admin wget‘. This command takes care of the authentication headache for you – it uses the your credentials already stored by our client to transparently take care of the authentication, letting you easily get the page you want.
Here’s some useful things you can now do easily using the new ‘ccollab admin wget’ command:
Get the content of a file in a Review (Review ID 123 and file version ID 456 – get version ID from ‘ccollab admin review-xml’):
ccollab admin wget “/data/server?reviewid=123&versionid=456″
Get the latest version of all files in a Review in a zip file (Review ID 123):
ccollab admin wget
“/data/server?reviewid=123&changelist=latest” > files.zip
List all Reviews of changelist 345 in CSV form:
ccollab admin wget “/report?reportid=3&ChangelistId=10304&format=csv“
Get a backup dump of your database in a zip file:
ccollab admin wget “/data/server?dump=1&withserverlogs=1″ > backup.zip