Merge lp://staging/~nmb/bzr-migration-docs/start-subversion-survival into lp://staging/bzr-migration-docs

Proposed by Neil Martinsen-Burrell
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~nmb/bzr-migration-docs/start-subversion-survival
Merge into: lp://staging/bzr-migration-docs
Diff against target: 192 lines
1 file modified
en/survival/bzr-for-svn-users.txt (+149/-6)
To merge this branch: bzr merge lp://staging/~nmb/bzr-migration-docs/start-subversion-survival
Reviewer Review Type Date Requested Status
Ian Clatworthy Approve
Review via email: mp+13000@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

This adds the start of a Subversion Survival Guide. It wasn't intended to be complete, nor to subvert (heh, heh) the main Bazaar documentation. It doesn't only cover the differences, but also the situations where the commands are identical.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Fantastic!

Merged and published.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'en/survival/bzr-for-svn-users.txt'
2--- en/survival/bzr-for-svn-users.txt 2009-10-07 14:02:02 +0000
3+++ en/survival/bzr-for-svn-users.txt 2009-10-07 16:05:22 +0000
4@@ -1,6 +1,7 @@
5 Bazaar for Subversion users
6 ===========================
7
8+<<<<<<< TREE
9 Introduction
10 ------------
11
12@@ -37,9 +38,19 @@
13 You can also use a mirroring program like rsync, if you prefer.
14
15
16+=======
17+The following is a basic introduction to equivalencies between Bazaar and
18+Subversion. For further information, refer to the `Bazaar documentation`_
19+online or use Bazaar's built-in help facilities by doing ``bzr help COMMAND``.
20+For further details, get started with ``bzr help topics``.
21+
22+.. _`Bazaar documentation`: http://doc.bazaar-vcs.org/latest/en
23+
24+>>>>>>> MERGE-SOURCE
25 Core tasks
26 ----------
27
28+<<<<<<< TREE
29 *"How are common Subversion tasks done in Bazaar?"*
30
31
32@@ -124,22 +135,154 @@
33 In both of these cases, the new changes will be saved to either
34 the repository (SVN) or branch (Bazaar).
35
36+=======
37+Checking out a project
38+++++++++++++++++++++++
39+
40+To get the source of a project located at URL::
41+
42+ svn co URL working_directory
43+ ====>
44+ bzr co --lightweight URL working_directory
45+
46+Note that Bazaar cannot check out subdirectories of a working tree, so where
47+``svn co URL`` and ``svn co URL/a/sub/directory`` both work, it is only
48+possible to do ``bzr co URL``.
49+
50+Adding new files
51+++++++++++++++++
52+
53+To put `file1` and `file2` under version control::
54+
55+ svn add file1 file2
56+ ====>
57+ bzr add file1 file2
58+
59+Note that ``bzr add`` will automatically add all unversioned, non-ignored files
60+under the current directory.
61+
62+Checking the status
63++++++++++++++++++++
64+
65+To check the status of the current directory::
66+
67+ svn st
68+ ====>
69+ bzr st -S .
70+
71+Note that Bazaar gives pathnames relative to the top of the working tree while
72+Subversion gives pathnames relative to the current directory.
73+
74+Committing changes
75+++++++++++++++++++
76+
77+To commit the current state of the working tree::
78+
79+ svn ci -m 'this is a commit message'
80+ ====>
81+ bzr ci =m 'this is a commit message'
82+
83+You can specify certain files to commit in the same way as in Subversion:
84+``bzr ci -m 'dont save all things' file1 file2``.
85+
86+Viewing history
87++++++++++++++++
88+
89+To see the history of the current project::
90+
91+ svn log
92+ ====>
93+ bzr log --short
94+
95+or to give verbose information including all of the files changed by each
96+revision use the ``-v`` flag. To see the log for a limited range of
97+revisions::
98+
99+ svn log -r 10:25
100+ ====>
101+ bzr log -r 10..25
102+
103+Updating to the latest version
104+++++++++++++++++++++++++++++++
105+
106+When other people have made a change to the project, your working copy may be
107+out of date. To update your working copy::
108+
109+ svn up
110+ ====>
111+ bzr up
112+
113+This update may result in conflicts which need to be manually resolved.
114+
115+Note that the update (up) command in Bazaar is not used to put the working
116+copy in the state of a previous revision as it is in Subversion.
117+
118+Changing to a previous revision
119++++++++++++++++++++++++++++++++
120+
121+To change the working tree to the state that it had in a previous revision::
122+
123+ svn up -r 25
124+ ====>
125+ bzr revert -r 25
126+
127+Note that both of these commands try not to lose uncommitted information
128+in the working tree, but they may do so in different ways. In both cases, use
129+of the ``status`` command after the change is recommended.
130+>>>>>>> MERGE-SOURCE
131
132
133 Network protocols
134 -----------------
135
136-*"How do network URLs differ?"*
137-
138-To be completed ...
139+Subversion accesses network resources using URLs, as does Bazaar. Both
140+programs have a native server program that runs remotely. These are svn://
141+and bzr:// URLs respectively. Both of these native protocols can be tunneled
142+over SSH to avoid the need to run a persistent program on the remote system on
143+a separate port. This gives svn+ssh:// and bzr+ssh:// URLs.
144+
145+Both Subversion and Bazaar can be accessed over HTTP, but there is a
146+difference in how they work with the limitations of that protocol. Subversion
147+runs as a module under Apache and serves repositories using the WebDAV
148+extensions to HTTP, thus allowing read/write access over HTTP. Bazaar
149+accesses the repository using the ordinary HTTP protocol. The relevant
150+difference is that Bazaar access over HTTP is read-only.
151+
152+Bazaar repositories are also read-write accessible using both
153+SFTP and plain FTP, which are *not* used by Subversion. See
154+``bzr help urlspec`` for more information.
155
156
157 Revisions
158 ---------
159
160-*How do revision identifiers differ?*
161-
162-To be completed ...
163+Both Subversion and Bazaar refer to revisions mainly by way of the ``-r``
164+option to commands. The most common way to refer to revisions is as numbers
165+starting from 1 and counting up with subsequent commits. Both Subversion and
166+Bazaar provide ways to refer to revisions in other terms as well. The table
167+below should serve as a preliminary guide to the equivalences
168+
169+===================== ============== ===============
170+Revision desired Subversion Bazaar
171+===================== ============== ===============
172+Revision Range ARG1:ARG2 ARG1..ARG2
173+Specific Date {2009-06-04} date:2009-06-04
174+Latest Revision HEAD -1
175+Next-to-last Revision HEAD-1 -2
176+===================== ============== ===============
177+
178+Due to the distributed nature of Bazaar, sequential revision numbers are
179+not authoritative in Bazaar as they are in Subversion. Due to merging with
180+other branches, Bazaar's revision numbers can change. The most consistent way
181+to refer to a revision in Bazaar is a revision id such as
182+
183+::
184+
185+ bzr revert -r revid:nmb@wartburg.edu-20091007045325-5jorn2ca1a4dgqp9
186+
187+These ids can be seen using ``bzr log --show-ids``. There are even more ways
188+to refer to related revisions in Bazaar. See
189+``bzr help revspec`` for further possibilities.
190
191
192 Other commands

Subscribers

People subscribed via source and target branches