Where should I check out branches from a local repo?

Asked by Zearin

I've only briefly tried solo versioning of my code with SVN, some months ago. I stopped for a couple of reasons:

• Either because I screwed up, or because my GUI screwed up, I would repeatedly end up with locks that prevented me committing my changes, which pretty much killed the point of versioning.
• Because everything was on my hard drive, I sometimes mixed up what was and was not a working copy.
• It seemed that SVN didn't like me moving or renaming things in the Finder (OS X file manager). I'm not 100% sure on this cause it was ages ago, and I only sort-of understood what I was doing.

I really want to take advantage of version control with my personal projects, though, and Bazaar is what's brought me back to the idea. However, I want to do it *correctly* when I'm ready to jump in, because I don't want to be stuck learning something about Bazaar if I have an approaching deadline, or end up somehow locking myself out of my own revisions (like above) due to ignorance on my part. (Or it may have been my GUI. I don't know and don't care to try and find out.)

So, what's the safest way to use Bazaar for personal code that will be a fool-proof method of keeping me aware of what is and isn't a working copy?

Question information

English Edit question
Bazaar Edit question
No assignee Edit question
Solved by:
Vincent Ladeuil
Last query:
Last reply:
Revision history for this message
Vincent Ladeuil (vila) said :

locks: I suppose you're refering to the svn feature of locking a file before editing it. There is no per-file locks with bzr so you shouldn't encounter that kind of problem.

mixing up what is or not working copy: I think you raised that point in another question, the concise answer is: "Don't edit what is under '.bzr'"

safest way to use Bazaar for personal code:
1 - create a branch (bzr init scratch-monkey)
2 - experiment with it:
   * try any operation that cross your mind and then issue 'bzr st' and 'bzr diff', they are the commands that should give you the most immediate feedback about what bzr understood (or not) about your last operation.

Revision history for this message
Zearin (zearin) said :

Great news about there not being locks! Thanks. That was a point of anxiety that was a big hesitation to moving to Bazaar for me. I'm very relieved to hear it's a total non-issue. :)

Regarding your instructions:
If I create a branch, don't I have to use either `pull` or `checkout` before editing the files?

(I asked about push/pull and checkout/checkin in the following Answer: https://answers.launchpad.net/bzr/+question/55268 )

Revision history for this message
Vincent Ladeuil (vila) said :

When you create a branch (with bzr branch) bzr will create the associated working tree so you can start editing your files right away.

Revision history for this message
Zearin (zearin) said :

Back to this after some time away.


Does this mean that when I do something like this…

     bzr branch http://some.url/project-ACME ACME

…if I go to the ACME directory in the Finder (OS X), the visible files ARE the working copy? So I can just start editing those without worrying I'll screw up the branch?

Revision history for this message
Best Vincent Ladeuil (vila) said :


The files bzr uses to record the history are under the ',bzr' directory, which, by default is hidden by the finder.

Revision history for this message
Zearin (zearin) said :

Thanks Vincent Ladeuil, that solved my question.