“How are common CVS tasks done in Bazaar?”
In the CVS world, somebody has already setup a CVS repository and has told you to perform some rather arcane instructions on how to get a “checkout”. Usually the instructions look something like:
$ export CVSROOT=":pserver:somemachine.com/this/directory/here/"
$ cvs login
$ cvs checkout codebase
In the Bazaar world, this is usually done with:
$ bzr checkout http://somemachine.com/this/directory/here/codebase
In the CVS world you may have done a checkout. From time to time you have to get new changes from the repository and apply them to your checkout. This usually looks something like this:
$ cd codebase/
$ cvs update
This looks very similar in the Bazaar world:
$ cd codebase/
$ bzr update
In both the CVS and Bazaar case this will mean that the changes in the repository or branch that you do not yet have in the working tree will be applied. You might have to deal with conflicts.
In the CVS world we often want to check how we have changed things since we last committed. By checking how the code base has changed, we can see what we’re about to commit before we actually perform the commit.
In the CVS world, we would check the changes this way:
$ cvs -n update
[see a list of files that have changed, or that need to be updated]
$ cvs diff
[see a diff of how files have changed]
This is very similar in Bazaar:
$ bzr status
[see a list of files that have changed]
$ bzr missing
[see a list of new revisions in the parent branch]
$ bzr diff
[see a diff of how files have changed]
In both of these cases, you’ll get a diff that you can review prior to commit.
(cvs also has a status command, but it’s less useful and rarely used.)
In the CVS world you may have made changes to your checkout that need to be saved in the repository. One typically does so in this way:
$ cvs commit -m'some description of whats being committed.'
Again, this looks very similar in the Bazaar world:
$ bzr commit -m'some description of whats being committed.'
In both of these cases, the new changes will be saved to either the repository (CVS) or branch (Bazaar).