I'm new to VCS and I'm just trying to get my head around how to use Bazaar for my situation. My situation is that I'm a solo web developer working on a web site that consists of a live website e.g. www.mysite.com and a staging/development site e.g. dev.mysite.com. I'm using Bazaar Explorer as I'm not really a command line type of guy. I just work from one main computer and I upload the files to the web server by FTP. I have Bazaar installed on my local Windows computer.
So to get started I created a Bazaar project on my local computer. I stuck with the default 'Feature branches' option since Bazarr documentation says that this is best for small projects (but I don't fully grasp the difference between the workspace models even after reading the docs). This created a folder (which I called _Source Control) with sub folders trunk and .bzr. I copied all my project files (i.e. the website files) into trunk and did an initial commit.
Now my first question is should I just work directly on these files or do I need to make another branch to work on?
Is this workflow a sensible approach or is there an obviously better way?:
Then how should I handle the situation where I discover that the latest update has introduced a problem and I want to roll the website back to the previous revision? Is it like this:
And a final question, is Checkout relevent at all in my situation?
The Feature branches
option of Bazaar Explorer creates a so-called Shared Repository and a single branch called trunk
inside it (called a Repository Tree). In your example:
_Source Control
== Shared Repository_Source Control/trunk
== Repository TreeThe idea is that in this setup you can create multiple branches next to trunk
, and they will store revision data efficiently, by sharing stuff in the shared repository, to put it in a nutshell.
If you are a beginner, then don't worry about branches. At some point it will probably naturally come to you. For example you realize you want to do something experimental but you don't want to mess up your trunk. The obvious solution will be to create a branch.
Now about your workflow:
I think you can use the bzr upload
plugin for both the staging site and the live site.
To roll back your live site to a previous version, use bzr upload -rREV --overwrite
where REV
is the revision you want to rollback to. Using the --overwrite
there looks dirty, and it probably is. But that's the only way it works for me, I think it's a bug in my version of the plugin (1.0.1dev
), I suggest to try first without that flag.
To fix the bug, no need to roll back locally, just fix the bug and confirm it, then upload again with bzr upload
without the other flags to bring the website up to the latest version.
There are many ways of working with Bazaar. You can implement a beautiful and sophisticated workflow, or use this somewhat dirty but simple and easy to understand workflow. Let me know if you have further problems.
And no, you don't need checkout
in the setup you described.