Newbie first contact, init--repos init and documentation the next generation (self anwsers to 27954)

Asked by xVaultX on 2008-04-03

I am not sure this is the right place or format to make a follow up to my previous 'Question' about a newbie contact with bzr but I wanted to follow up with what I understood by myself and where I found the answer.

It could be useful for a newbie to know where to look for some answer if he is as challenged in the brain as I am. :)
It could also help understand how a newbie got the documentation and what questions he asked himself.
I think the lack of answers or comments in my previous post is because many senior here thought "this is explained there or somewhere", and for most part they are right, but my point was not to say that documentation is lacking, it is not, but to explain the thought process of a newbie and the kind of information he looked for. Taking me as a great example of noobiness, modestly :)

for those who need some context my previous puzzled and puzzlig post was here
https://answers.launchpad.net/bzr/+question/27954

I will answer here to the questions I asked the way I understood the answers and try to give my sources.

Newbie path to understanding bazaar
=====================================

To me the doc that together explained most of my terms are

"The Bazaar user guide"
http://doc.bazaar-vcs.org/latest/en/user-guide/index.html
Force yourself to read it from back to front or front to back if your are European ( ;) ) because some things are answered or made more palatable later in the document.
Another GREAT piece of information that at the same time gave me a good way to see how to put the central repository way with Bazaar and gave explanations on things I would have loved to read in the Bazaar user guide was :
"Centralized Workflow"
http://doc.bazaar-vcs.org/bzr.1.3/en/tutorials/centralized_workflow.html

I suspect that if you take the time to read this two document FIRST you will have much less doubt and question than I had trying to progress through the doc and applying what I read immediately.
Remind me of that saying about good procrastination and planning being the key of success ... must have been a REAL developer talking :)

good additional reading concerning transport with SSH and the "Serve" mode of bazaar that is useful when working in the centralized workflow mindset would be
http://bazaar-vcs.org/Bzr_and_SSH

http://doc.bazaar-vcs.org/latest/en/mini-tutorial/index.html is a good summary too.

I will try to answer the question I asked in my previous post and to give the answser I feel confortable with now.

 "What is Bazaar (beside a DVCS)"
 =================================
 "Bazaar is a set of data layout and protocol to manage version control.
if you have someplace such a set of files (tucked in a .bzr directory on the root of your repository) and you can file access it then you can do Version Control with that base.

Bazaar as no special server and does not give a special role at first to one such repository.

That means that your repository can be local, on the same place you have your source files, or local on another directory, or on a file share, or accessible through the web (via webdav for write access), or through FTP or SSH.

You can be one or many to "sync" with an elected "main" repository and put yourself under a few constraints that emulate centralized VCS system. Or you can do a "peer to peer" aka distributed VCS :
  user A =SSH sync=> user B ==FTP sync=> user C =SSH=> user A.

Or you can sync with user B and user C to merge changes they both made and committed to their "branched" source set.""

This is mostly right and help get a general feeling of bazaar beyond the crude concept of DVCS.

Repos and branches
=====================
One thing that cal puzzle newbies is the emphasis on Branches and the constant pop up of Repositories in the doc.

This is because what bazaar is all about are Branches. Branches are the core unit to manage a "working tree" of file you want to version. At the root of such a working tree initialized with "bzr init" you have a .bzr directory and that is all :)
A branch is all that is needed for Bazaar to work.

A repos is a technical convenience to allow several branches to share information between them. It avoid duplication of information between branches, increase performance, reduce disk usage etc etc ...

This is why in several places you will se the author of guide and tutorials make a repos (bzr init-repo) and a bazaar branch (bzr init) in a directory underneath it.

Repos are not key to understanding Bazar but a tool to make Bazaar more efficient and coherent.

==== Repos branch working set and placement =======

I said stupid things in that part in my previous post showing my misunderstandings :)

The concept of working set is called a working Tree in Bazaar

You can have your Working Tree in the same place you have your Branch information, doing a "bzr init" at the root of you working tree.

When you have a repos or branches in a place where having the Working Tree would be irrelevant (because nobody could, should or would modify the files in that place) you can make the Branch/repository devoid of the working set (--no-tree option)

It happens most of the time when you use a centralized repository (not version control strategy) where the "mainline" is on a designed server.
Most of the time this server old in a shared place a repos and the mainline branch at least without the working tree.

So you can mix you branches and working set to your heart content if you want, just try to keep things sane for you and not to make nested branches, this is not supported as of yet (soon will be) and will cover some other case.
(Trunk/Project/SubProject concept not Trunk/Branch1/Branch2/Branch3)

================= "central repository and the pull command " ===

My questions in my previous post where answered in the "Centralized Workflow" document.
Mostly the repos/branch thing I explained above.

and the checkout concept is indeed to make a link between a branch and another (mainline/principal/reference) branch in a way that make all commit to be replicated to the reference branch, forcing an update (getting the changes in the mainline and merging your changes with) if necessary.

Thus a checkout allow to reproduce the "a Mainline branch is the reference " mindset of more centralized CVS. With a lot more flexibility I might add.

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
2008-04-03
Last reply:
2008-04-04
Martin Pool (mbp) said : #1

I _think_ Launchpad will let you go back to your previous question and add more information through the form at the bottom - was this not working for you?

Martin Pool (mbp) said : #2

Or, you can just reply to one of the mails from Launchpad about your
question, and that will add a followup to your mail.

Can you help with this problem?

Provide an answer of your own, or ask xVaultX for more information if necessary.

To post a message you must log in.