← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~ursinha/launchpad/fix-919679-copy-packages-show-ppa-id into lp:launchpad

 

Ursula Junque has proposed merging lp:~ursinha/launchpad/fix-919679-copy-packages-show-ppa-id into lp:launchpad.

Commit message:
Add ~ownername/ppaname to "Destination PPA" on +copy-packages select box.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ursinha/launchpad/fix-919679-copy-packages-show-ppa-id/+merge/162415

In the +copy-package 's "Destination PPA" select box, currently lists the PPA display names, which makes hard to identify it since display name is not unique. This branch changes that to additionally display the PPA owner name and the PPA name.

In short:
From
'PPA for Ursula Junque'
To
'PPA for Ursula Junque (~ursinha/ppa)'

To test it, go to the +copy-packages page of a PPA and check the "Destination PPA" select box. (E.g.: https://launchpad.dev/~cprov/+archive/ppa/+copy-packages)
-- 
https://code.launchpad.net/~ursinha/launchpad/fix-919679-copy-packages-show-ppa-id/+merge/162415
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~ursinha/launchpad/fix-919679-copy-packages-show-ppa-id into lp:launchpad.
=== modified file 'lib/lp/soyuz/browser/archive.py'
--- lib/lp/soyuz/browser/archive.py	2013-05-02 00:40:14 +0000
+++ lib/lp/soyuz/browser/archive.py	2013-05-03 16:23:10 +0000
@@ -1369,7 +1369,7 @@
     terms = []
     for archive in archives:
         token = '%s/%s' % (archive.owner.name, archive.name)
-        label = archive.displayname
+        label = '%s (~%s)' % (archive.displayname, token)
         terms.append(SimpleTerm(archive, token, label))
     return SimpleVocabulary(terms)
 

=== modified file 'lib/lp/soyuz/stories/ppa/xx-copy-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-copy-packages.txt	2013-01-22 02:06:59 +0000
+++ lib/lp/soyuz/stories/ppa/xx-copy-packages.txt	2013-05-03 16:23:10 +0000
@@ -225,7 +225,7 @@
 default form value for 'Destination PPA'.
 
     >>> print jblack_browser.getControl('Destination PPA').displayOptions
-    ['PPA for James Blackwell']
+    ['PPA for James Blackwell (~jblack/ppa)']
 
     >>> print jblack_browser.getControl('Destination PPA').value
     ['jblack/ppa']
@@ -729,7 +729,7 @@
 allows him to select one of them.
 
     >>> print jblack_browser.getControl('Destination PPA').displayOptions
-    ['PPA for James Blackwell', 'PPA for James Blackwell Friends']
+    ['PPA for James Blackwell (~jblack/ppa)', 'PPA for James Blackwell Friends (~jblack-friends/ppa)']
 
 James wants to populate the PPA for James Blackwell Friends, he
 selects that.