Merge lp:~smartboyhw/launchpad/bug-1137716-fix into lp:launchpad

Proposed by Howard Chan
Status: Merged
Approved by: Colin Watson
Approved revision: no longer in the source branch.
Merged at revision: 16770
Proposed branch: lp:~smartboyhw/launchpad/bug-1137716-fix
Merge into: lp:launchpad
Diff against target: 58 lines (+6/-6)
3 files modified
lib/lp/code/browser/tests/test_branch.py (+3/-3)
lib/lp/code/stories/branches/xx-upload-directions.txt (+2/-2)
lib/lp/code/templates/branch-management.pt (+1/-1)
To merge this branch: bzr merge lp:~smartboyhw/launchpad/bug-1137716-fix
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+152557@code.launchpad.net

Commit message

Use correct --use-existing-dir flag for bzr branches.

Description of the change

To fix Bug 1137716.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Looks good to me, thanks. Sorry for the delay.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/code/browser/tests/test_branch.py'
--- lib/lp/code/browser/tests/test_branch.py 2013-02-28 03:48:21 +0000
+++ lib/lp/code/browser/tests/test_branch.py 2013-03-09 11:43:23 +0000
@@ -228,16 +228,16 @@
228 self.assertFalse(view.is_empty_directory)228 self.assertFalse(view.is_empty_directory)
229229
230 def test_empty_directories_use_existing(self):230 def test_empty_directories_use_existing(self):
231 # Push example should include --use-existing for empty directories.231 # Push example should include --use-existing-dir for empty directories.
232 branch = self.factory.makeBranch(owner=self.user)232 branch = self.factory.makeBranch(owner=self.user)
233 text = self.getMainText(branch)233 text = self.getMainText(branch)
234 self.assertIn('push\n--use-existing', text)234 self.assertIn('push\n--use-existing-dir', text)
235 with person_logged_in(self.user):235 with person_logged_in(self.user):
236 # Make it look as though the branch has been pushed.236 # Make it look as though the branch has been pushed.
237 branch.branchChanged(237 branch.branchChanged(
238 None, None, ControlFormat.BZR_METADIR_1, None, None)238 None, None, ControlFormat.BZR_METADIR_1, None, None)
239 text = self.getMainText(branch)239 text = self.getMainText(branch)
240 self.assertNotIn('push\n--use-existing', text)240 self.assertNotIn('push\n--use-existing-dir', text)
241241
242 def test_user_can_upload(self):242 def test_user_can_upload(self):
243 # A user can upload if they have edit permissions.243 # A user can upload if they have edit permissions.
244244
=== modified file 'lib/lp/code/stories/branches/xx-upload-directions.txt'
--- lib/lp/code/stories/branches/xx-upload-directions.txt 2012-08-16 13:54:54 +0000
+++ lib/lp/code/stories/branches/xx-upload-directions.txt 2013-03-09 11:43:23 +0000
@@ -76,7 +76,7 @@
76 >>> instructions = find_tag_by_id(content, 'upload-directions')76 >>> instructions = find_tag_by_id(content, 'upload-directions')
77 >>> print extract_text(instructions)77 >>> print extract_text(instructions)
78 Update this branch:78 Update this branch:
79 bzr push --use-existing lp://dev/~name12/gnome-terminal/pushed79 bzr push --use-existing-dir lp://dev/~name12/gnome-terminal/pushed
8080
8181
82== SSH key directions ==82== SSH key directions ==
@@ -183,7 +183,7 @@
183 >>> instructions = find_tag_by_id(content, 'upload-directions')183 >>> instructions = find_tag_by_id(content, 'upload-directions')
184 >>> print extract_text(instructions)184 >>> print extract_text(instructions)
185 Update this branch:185 Update this branch:
186 bzr push --use-existing186 bzr push --use-existing-dir
187 lp://dev/~landscape-developers/gnome-terminal/pushed187 lp://dev/~landscape-developers/gnome-terminal/pushed
188188
189189
190190
=== modified file 'lib/lp/code/templates/branch-management.pt'
--- lib/lp/code/templates/branch-management.pt 2012-03-10 15:08:09 +0000
+++ lib/lp/code/templates/branch-management.pt 2013-03-09 11:43:23 +0000
@@ -48,7 +48,7 @@
48 <tt class="command">48 <tt class="command">
49 bzr push49 bzr push
50 <tal:use-existing condition="view/is_empty_directory">50 <tal:use-existing condition="view/is_empty_directory">
51 --use-existing51 --use-existing-dir
52 </tal:use-existing>52 </tal:use-existing>
53 <span class="branch-url" tal:content="context/bzr_identity" />53 <span class="branch-url" tal:content="context/bzr_identity" />
54 </tt>54 </tt>