Merge lp:~davidc3/developer-ubuntu-com/no-git-protocol into lp:developer-ubuntu-com

Proposed by David Callé
Status: Merged
Approved by: Daniel Holbach
Approved revision: 164
Merged at revision: 163
Proposed branch: lp:~davidc3/developer-ubuntu-com/no-git-protocol
Merge into: lp:developer-ubuntu-com
Diff against target: 45 lines (+6/-4)
2 files modified
developer_portal/management/commands/import-external-docs-branches.py (+5/-3)
developer_portal/models.py (+1/-1)
To merge this branch: bzr merge lp:~davidc3/developer-ubuntu-com/no-git-protocol
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Review via email: mp+276411@code.launchpad.net

Description of the change

Switch to github https instead of git protocol
+ misc wording and checks

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Inline comments.

164. By David Callé

Less wording changes, better branch name parsing

Revision history for this message
Daniel Holbach (dholbach) wrote :

Great, thanks

review: Approve
Revision history for this message
Daniel Holbach (dholbach) wrote :

Great, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'developer_portal/management/commands/import-external-docs-branches.py'
2--- developer_portal/management/commands/import-external-docs-branches.py 2015-10-30 10:34:06 +0000
3+++ developer_portal/management/commands/import-external-docs-branches.py 2015-11-02 16:48:17 +0000
4@@ -229,7 +229,7 @@
5 "<code>%s</code> Snappy branch.</p>"
6 "<p><ul class=\"list-ubuntu\">%s</ul></p>\n"
7 "<p>Auto-imported from <a "
8- "href=\"https://code.launchpad.net/snappy\">%s</a>.</p>\n"
9+ "href=\"https://github.com/ubuntu-core/snappy\">%s</a>.</p>\n"
10 "</div></div>") % (self.release_alias, list_pages,
11 self.external_branch.lp_origin)
12 self.db_actions.add_page(
13@@ -309,7 +309,8 @@
14 if os.path.exists(checkout_location):
15 shutil.rmtree(checkout_location)
16 break
17- if branch.lp_origin.startswith('lp:snappy'):
18+ if branch.lp_origin.startswith('lp:snappy') or \
19+ 'snappy' in branch.lp_origin.split(':')[1].split('.git')[0].split('/'):
20 local_branch = SnappyLocalBranch(checkout_location, branch,
21 db_actions)
22 else:
23@@ -332,7 +333,8 @@
24 return subprocess.call([
25 'bzr', 'checkout', '--lightweight', self.branch_origin,
26 self.checkout_location])
27- if self.branch_origin.startswith('git://') and \
28+ if self.branch_origin.startswith('https://github.com') and \
29+ self.branch_origin.endswith('.git') and \
30 os.path.exists('/usr/bin/git'):
31 return subprocess.call([
32 'git', 'clone', '-q', self.branch_origin,
33
34=== modified file 'developer_portal/models.py'
35--- developer_portal/models.py 2015-10-30 08:50:29 +0000
36+++ developer_portal/models.py 2015-11-02 16:48:17 +0000
37@@ -27,7 +27,7 @@
38 lp_origin = models.CharField(
39 max_length=200,
40 help_text=_('External branch location, ie: lp:snappy/15.04 or '
41- 'git://github.com/ubuntu-core/snappy'))
42+ 'https://github.com/ubuntu-core/snappy.git'))
43 docs_namespace = models.CharField(
44 max_length=120,
45 help_text=_('Path alias we want to use for the docs, '

Subscribers

People subscribed via source and target branches