Rev 5908: (jameinel) improved mini-tutorial (Martin Pool) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sat May 21 19:35:12 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5908 [merge]
revision-id: pqm at pqm.ubuntu.com-20110521193506-jcqa7fl03yt164zg
parent: pqm at pqm.ubuntu.com-20110521175049-yz1fb5qcgrkhz2d0
parent: mbp at canonical.com-20110520142343-g23oe3a0yll4d821
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sat 2011-05-21 19:35:06 +0000
message:
  (jameinel) improved mini-tutorial (Martin Pool)
modified:
  doc/en/mini-tutorial/index.txt index.txt-20070813141352-2u64ooqzo0or4hss-2
=== modified file 'doc/en/mini-tutorial/index.txt'
--- a/doc/en/mini-tutorial/index.txt	2011-05-16 10:22:06 +0000
+++ b/doc/en/mini-tutorial/index.txt	2011-05-20 14:23:43 +0000
@@ -12,9 +12,6 @@
 version control, how to record changes to them, examine your work, publish
 it and send your work for merger into a project's trunk.
 
-If you'd prefer a more detailed introduction, take a look at
-`Learning More`_.
-
 
 Installation
 ============
@@ -38,64 +35,35 @@
 Introducing yourself
 ====================
 
-Before you start working, it is good to tell Bazaar who you are. That
-way your work is properly identified in revision logs.
+Bazaar records changes to source code, and it records who made the change.
+The person is identified by their name and email address.  (If you're
+concerned about spam, you don't need to use a real address that you
+actually read, but the convention is that it looks like an email address.)
 
-Using your name and email address, instead of John Doe's, type::
+Before you start working, let's tell Bazaar who you are.  Using your name
+and email address, instead of John Doe's, type::
 
   $ bzr whoami "John Doe <john.doe at gmail.com>"
 
-Bazaar will now create or modify a configuration file, including your
-name and email address.
-
-Now, check that your name and email address are correctly registered::
+You can check what identity is stored in Bazaar's configuration::
 
   $ bzr whoami
   John Doe <john.doe at gmail.com>
 
 
-Putting files under version control
-===================================
-
-Let's create a directory and some files to use with Bazaar::
-
- $ mkdir myproject
- $ cd myproject
- $ mkdir subdirectory
- $ touch test1.txt test2.txt test3.txt subdirectory/test4.txt
-
-**Note for Windows users**: use Windows Explorer to create your
-directories, then right-click in those directories and select
-``New file`` to create your files.
-
-Now get Bazaar to initialize itself in your project directory::
-
-  $ bzr init
-
-If it looks like nothing happened, don't worry. Bazaar has created a
-branch_ where it will store your files and their revision histories.
-
-.. _branch: http://wiki.bazaar.canonical.com/Branch
-
-The next step is to tell Bazaar which files you want to track. Running
-``bzr add`` will recursively add everything in the project::
-
- $ bzr add
- added subdirectory
- added test1.txt
- added test2.txt
- added test3.txt
- added subdirectory/test4.txt
-
-Next, take a snapshot of your files by committing them to your branch. Add
-a message to explain why you made the commit::
-
-  $ bzr commit -m "Initial import"
-
-As Bazaar is a distributed version control system, it doesn't need to
-connect to a central server to make the commit. Instead, Bazaar stores your
-branch and all its commits inside the directory you're working with; look
-for the ``.bzr`` sub-directory.
+Starting a new project
+======================
+
+Let's suppose we want to store a new project under Bazaar.  First, we'll
+make a directory to hold all our work related to this project.  We'll make
+a *repository directory*, which means that the 
+
+::
+
+  bzr init-repo sample
+  cd sample
+  bzr init trunk
+  cd trunk
 
 
 Making changes to your files
@@ -153,14 +121,14 @@
 .. _account signup guide: https://help.launchpad.net/CreatingYourLaunchpadAccount
 .. _register an SSH key: https://launchpad.net/people/+me/+editsshkeys
 
-Replacing ``john.doe`` with your own Launchpad username, type [#]_::
+Replacing ``john.doe`` with your own Launchpad username, type::
 
  $ bzr push lp:~john.doe/+junk/myproject
 
-.. [#] Use of the ``lp:`` URL scheme requires bzr 0.92 or later.
-
-**Note**: ``+junk`` means that this branch isn't associated with any particular
-project in Launchpad.
+**Note**: ``+junk`` is a place to store experimental branches not
+associated with any particular project.  Normally, you should push a
+project into an existing project, or register a new project through the
+web interface.
 
 Now, anyone can create their own copy of your branch by typing::
 
@@ -170,19 +138,18 @@
 history, at https://code.launchpad.net/people/+me/+junk/myproject
 
 
-
-
 Creating your own copy of another branch
 ========================================
 
 To work with someone else's code, you can make your own copy of their
 branch. Let's take a real-world example, Bazaar's GTK interface::
 
-  $ bzr branch lp:~bzr/bzr-gtk/trunk bzr-gtk.john
+  $ bzr init-repo ~/bzr-gtk
+  $ bzr branch lp:~bzr/bzr-gtk/trunk ~/bzr-gtk/john
   Branched 292 revision(s).
 
 Bazaar will download all the files and complete revision history from the
-bzr-gtk project's trunk branch and create a copy called bzr-gtk.john.
+bzr-gtk project's trunk branch and create a copy called ``john``.
 
 Now, you have your own copy of the branch and can commit changes with
 or without a net connection. You can share your branch at any time by
@@ -207,6 +174,13 @@
 
   $ bzr diff
 
+If different branches have made changes to the same areas of the same
+files, then merging them may generate conflicts.  When this happens,
+Bazaar puts text markers like ``<<<<<<<`` into the files, and records them
+in a list of conflicted files.  You should edit the files to reflect the
+way you want to resolve the conflicts, use ``bzr diff`` to check the
+changes, and then ``bzr resolve`` to mark them as resolved.
+
 If you're happy with the changes, you can commit them to your personal
 branch::
 
@@ -214,27 +188,6 @@
   Committed revision 295.
 
 
-Merging your work into the parent branch
-========================================
-
-After you've worked on your personal branch of bzr-gtk, you may want to
-send your changes back upstream to the project. The easiest way is to
-use a merge directive.
-
-A merge directive is a machine-readable request to perform a
-particular merge.  It usually contains a patch preview of the merge
-and either contains the necessary revisions, or provides a branch
-where they can be found.
-
-Replacing ``mycode.patch``, create your merge directive::
-
- $ bzr send -o mycode.patch
- Using saved parent location: http://bazaar.launchpad.net/~bzr/bzr-gtk/trunk
-
-You can now email the merge directive to the bzr-gtk project who, if
-they choose, can use it merge your work back into the parent branch.
-
-
 Learning more
 =============
 
@@ -245,16 +198,12 @@
 
   $ bzr help
 
-To learn about Bazaar commands::
-
-  $ bzr help commands
-
 To learn about the ''foo'' topic or command::
 
   $ bzr help foo
 
 Licence
-=============
+=======
 
 Copyright 2007-2011 Canonical Ltd. Bazaar is free software, and you
 may use, modify and redistribute both Bazaar and this document under




More information about the bazaar-commits mailing list