Bazaar Version Control System

Where should I check out branches from a local repo?

Asked by Zearin on 2008-12-24

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

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Vincent Ladeuil
Solved:
2009-07-15
Last query:
2009-07-15
Last reply:
2009-04-07
Vincent Ladeuil (vila) said : #1

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.

Zearin (zearin) said : #2

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 )

Vincent Ladeuil (vila) said : #3

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

Zearin (zearin) said : #4

Back to this after some time away.

OH!

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?

Best Vincent Ladeuil (vila) said : #5

Exactly.

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

Zearin (zearin) said : #6

Thanks Vincent Ladeuil, that solved my question.