Merge lp:~bialix/bzr-colo/checkout into lp:bzr-colo

Proposed by Alexander Belchenko
Status: Merged
Merged at revision: not available
Proposed branch: lp:~bialix/bzr-colo/checkout
Merge into: lp:bzr-colo
Diff against target: 197 lines (+28/-27)
4 files modified
__init__.py (+2/-2)
commands.py (+2/-1)
tests/test_colo.py (+11/-11)
tutorial.py (+13/-13)
To merge this branch: bzr merge lp:~bialix/bzr-colo/checkout
Reviewer Review Type Date Requested Status
Neil Martinsen-Burrell Pending
Review via email: mp+18760@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexander Belchenko (bialix) wrote :

This patch changed name of colo-clone command to colo-checkout, because actually help and tutorial talk about creating new checkout for existing colo workspace instead of cloning (copy) workspace itself. I think clone is wrong word here and misleading.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '__init__.py'
--- __init__.py 2010-01-14 12:55:12 +0000
+++ __init__.py 2010-02-06 14:09:14 +0000
@@ -31,7 +31,7 @@
31 * colo-branch31 * colo-branch
32 * colo-branches32 * colo-branches
33 * colo-fetch33 * colo-fetch
34 * colo-clone34 * colo-checkout
35 * colo-prune35 * colo-prune
36 * colo-clean36 * colo-clean
37 * colo-ify37 * colo-ify
@@ -91,7 +91,7 @@
91 ('cmd_colo_branch', []),91 ('cmd_colo_branch', []),
92 ('cmd_colo_branches', []),92 ('cmd_colo_branches', []),
93 ('cmd_colo_fetch', []),93 ('cmd_colo_fetch', []),
94 ('cmd_colo_clone', []),94 ('cmd_colo_checkout', ['colo-co']),
95 ('cmd_colo_prune', []),95 ('cmd_colo_prune', []),
96 ('cmd_colo_clean', []),96 ('cmd_colo_clean', []),
97 ('cmd_colo_ify', []),97 ('cmd_colo_ify', []),
9898
=== modified file 'commands.py'
--- commands.py 2010-01-14 18:34:54 +0000
+++ commands.py 2010-02-06 14:09:14 +0000
@@ -256,7 +256,7 @@
256 remember=True)256 remember=True)
257257
258258
259class cmd_colo_clone(commands.Command):259class cmd_colo_checkout(commands.Command):
260260
261 """Create a checkout of this branch in a new directory.261 """Create a checkout of this branch in a new directory.
262 262
@@ -266,6 +266,7 @@
266 the new checkout is switched to that new branch.266 the new checkout is switched to that new branch.
267 """267 """
268268
269 alises = ['colo-co']
269 takes_args = ['to_directory']270 takes_args = ['to_directory']
270 takes_options = [271 takes_options = [
271 option.Option('create',272 option.Option('create',
272273
=== modified file 'tests/test_colo.py'
--- tests/test_colo.py 2010-02-05 16:31:24 +0000
+++ tests/test_colo.py 2010-02-06 14:09:14 +0000
@@ -380,18 +380,18 @@
380""")380""")
381381
382382
383class TestColoClone(script.TestCaseWithTransportAndScript):383class TestColoCheckout(script.TestCaseWithTransportAndScript):
384384
385 def test_clone(self):385 def test_checkout(self):
386 self.run_script("""386 self.run_script("""
387$ bzr colo-init branch387$ bzr colo-init branch
388$ cd branch388$ cd branch
389$ bzr colo-clone ../branch2389$ bzr colo-checkout ../branch2
390$ cd ../branch2390$ cd ../branch2
391$ cat .bzr/README391$ cat .bzr/README
392""")392""")
393393
394 def test_clone_example(self):394 def test_checkout_example(self):
395 self.run_script("""395 self.run_script("""
396$ bzr colo-init branch396$ bzr colo-init branch
397$ cd branch397$ cd branch
@@ -401,16 +401,16 @@
401 trunk401 trunk
402$ bzr switch trunk402$ bzr switch trunk
403$ bzr colo-branch fix-unicode-normalization403$ bzr colo-branch fix-unicode-normalization
404$ bzr colo-clone ../fix-unicode-normalization404$ bzr colo-checkout ../fix-unicode-normalization
405$ cd ../fix-unicode-normalization405$ cd ../fix-unicode-normalization
406$ cat .bzr/README406$ cat .bzr/README
407""")407""")
408408
409 def test_clone_create(self):409 def test_checkout_create(self):
410 self.run_script("""410 self.run_script("""
411$ bzr colo-init branch411$ bzr colo-init branch
412$ cd branch412$ cd branch
413$ bzr colo-clone --create ../fix1413$ bzr colo-checkout --create ../fix1
414$ bzr colo-branches414$ bzr colo-branches
415 fix1415 fix1
416* trunk416* trunk
@@ -425,10 +425,10 @@
425 trunk425 trunk
426""")426""")
427427
428 def test_clone_in_directory(self):428 def test_checkout_in_directory(self):
429 self.run_script("""429 self.run_script("""
430$ bzr colo-init430$ bzr colo-init
431$ bzr colo-clone tree431$ bzr colo-checkout tree
432$ cd tree432$ cd tree
433$ cat .bzr/README433$ cat .bzr/README
434$ bzr nick434$ bzr nick
@@ -694,12 +694,12 @@
694 trunk694 trunk
695""")695""")
696696
697 def test_clone(self):697 def test_checkout(self):
698 self.run_script("""698 self.run_script("""
699$ bzr colo-init test699$ bzr colo-init test
700$ cd test700$ cd test
701$ bzr colo-branch a/b701$ bzr colo-branch a/b
702$ bzr colo-clone ../b-checkout702$ bzr colo-checkout ../b-checkout
703$ cd ../b-checkout703$ cd ../b-checkout
704$ bzr switch colo:trunk704$ bzr switch colo:trunk
705""")705""")
706706
=== modified file 'tutorial.py'
--- tutorial.py 2010-01-14 12:55:12 +0000
+++ tutorial.py 2010-02-06 14:09:14 +0000
@@ -116,7 +116,7 @@
116116
117Sometimes it is nice to be able to make a second working tree for the same117Sometimes it is nice to be able to make a second working tree for the same
118colocated workspace, for example to work on a second bug fix in parallel.118colocated workspace, for example to work on a second bug fix in parallel.
119This plugin provides the ``colo-clone`` command which creates a second119This plugin provides the ``colo-checkout`` command which creates a second
120checkout of the current branch in the specified directory. Often, the120checkout of the current branch in the specified directory. Often, the
121specified directory will be a sibling of the current workspace. For example::121specified directory will be a sibling of the current workspace. For example::
122122
@@ -124,7 +124,7 @@
124 fix-eol-bug124 fix-eol-bug
125 * trunk125 * trunk
126 $ bzr colo-branch fix-unicode-normalization # creates a colocated branch126 $ bzr colo-branch fix-unicode-normalization # creates a colocated branch
127 $ bzr colo-clone ../fix-unicode-normalization127 $ bzr colo-checkout ../fix-unicode-normalization
128 $ cd ../fix-unicode-normalization128 $ cd ../fix-unicode-normalization
129 $ bzr colo-branches129 $ bzr colo-branches
130 fix-eol-bug130 fix-eol-bug
@@ -140,13 +140,13 @@
140 $ bzr diff --old=colo:trunk140 $ bzr diff --old=colo:trunk
141141
142Since creating a new colocated branch for work in a new checkout is a common142Since creating a new colocated branch for work in a new checkout is a common
143operation, the ``colo-clone`` command takes a ``--create`` option to indicate143operation, the ``colo-checkout`` command takes a ``--create`` option
144that a new colocated branch should be created and then the new checkout should144to indicate that a new colocated branch should be created and then the new
145be switched to that new branch. The name of the new branch comes from the145checkout should be switched to that new branch. The name of the new branch
146basename of the directory that is being created. For example, we could146comes from the basename of the directory that is being created.
147shorten the above example as::147For example, we could shorten the above example as::
148148
149 $ bzr colo-clone --create ../fix-unicode-normalization149 $ bzr colo-checkout --create ../fix-unicode-normalization
150150
151Fetching an Existing Project151Fetching an Existing Project
152----------------------------152----------------------------
@@ -309,7 +309,7 @@
309re-create. This can be a disadvantage when we want to have two separate309re-create. This can be a disadvantage when we want to have two separate
310working trees, for example to compare two sets of files or to maintain a310working trees, for example to compare two sets of files or to maintain a
311working tree that is up to date with a particular branch. We can do this311working tree that is up to date with a particular branch. We can do this
312using a colocated workspace and the ``colo-clone`` command.312using a colocated workspace and the ``colo-checkout`` command.
313313
314For example, when developing a project such as Bazaar, it can be important to314For example, when developing a project such as Bazaar, it can be important to
315have a pristine copy of the trunk from which to run Bazaar while developing so315have a pristine copy of the trunk from which to run Bazaar while developing so
@@ -320,7 +320,7 @@
320320
321 $ bzr colo-fetch lp:bzr bzr321 $ bzr colo-fetch lp:bzr bzr
322 $ cd bzr322 $ cd bzr
323 $ bzr colo-clone ../bzr.dev323 $ bzr colo-checkout ../bzr.dev
324 $ bzr colo-branch fix-doc-bugs324 $ bzr colo-branch fix-doc-bugs
325 $ bzr colo-branches325 $ bzr colo-branches
326 * fix-doc-bugs326 * fix-doc-bugs
@@ -328,8 +328,8 @@
328 $ ../bzr.dev/bzr --version # this runs the trunk version of bzr328 $ ../bzr.dev/bzr --version # this runs the trunk version of bzr
329 $ ./bzr --version # this runs the version in the fix-doc-bugs branch329 $ ./bzr --version # this runs the version in the fix-doc-bugs branch
330330
331Another use for the ``colo-clone`` command is to create a second working tree331Another use for the ``colo-checkout`` command is to create a second working
332to do some work without interrupting the work that is happening in the332tree to do some work without interrupting the work that is happening in the
333colocated workspace (although a judicious use of ``bzr shelve`` can sometimes333colocated workspace (although a judicious use of ``bzr shelve`` can sometimes
334make this unnecessary). Here is an example that uses the ``--create`` option334make this unnecessary). Here is an example that uses the ``--create`` option
335to create a new branch and make a new checkout of it::335to create a new branch and make a new checkout of it::
@@ -337,7 +337,7 @@
337 $ bzr colo-branches337 $ bzr colo-branches
338 * fix-doc-bugs338 * fix-doc-bugs
339 trunk339 trunk
340 $ bzr colo-clone --create ../urgent-fix340 $ bzr colo-checkout --create ../urgent-fix
341 $ bzr colo-branches341 $ bzr colo-branches
342 * fix-doc-bugs342 * fix-doc-bugs
343 trunk343 trunk

Subscribers

People subscribed via source and target branches