Merge lp:~abentley/launchpad/use-existing into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Māris Fogels | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12077 | ||||
Proposed branch: | lp:~abentley/launchpad/use-existing | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
114 lines (+40/-4) 4 files modified
lib/lp/code/browser/branch.py (+5/-0) lib/lp/code/browser/tests/test_branch.py (+27/-1) lib/lp/code/stories/branches/xx-upload-directions.txt (+3/-2) lib/lp/code/templates/branch-management.pt (+5/-1) |
||||
To merge this branch: | bzr merge lp:~abentley/launchpad/use-existing | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Māris Fogels (community) | Approve | ||
Review via email: mp+43701@code.launchpad.net |
Commit message
[r=mars][ui=none][bug=258610] Suggest --use-existing for empty branches.
Description of the change
= Summary =
Fix bug #258610: Show bzr push command for empty branches
== Proposed fix ==
When a branch is completely empty, without even a .bzr directory, show "push
--use-existing $BRANCH" instead of "push $BRANCH".
== Pre-implementation notes ==
None
== Implementation details ==
When the initial push is performed, branchChanged will be called immediately
(before the branch scan), and this will update the control format. So as soon
as the initial push is performed, the branch will not be detected as an empty
directory.
== Tests ==
bin/test -t test_empty_
Test time: 1.921
== Demo and Q/A ==
Create a hosted branch through the web UI by selecting "Register a branch".
It should show --use-existing in the push command.
Push to the branch. Now it should not show --use-existing.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
Hi Aaron,
This changes looks good. Nice tests. r=mars
The only recommendation I have is somehow making it clear that setting the ControlFormat(?) counts as creating an existing .bzr directory. The command is black magic to me (perhaps it's obvious to someone who works in the Bazaar domain? Something like .add_bzr_ control_ directory( )? :)
Maris