~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/doc/package-diff.txt

  • Committer: Curtis Hovey
  • Date: 2011-12-18 15:13:07 UTC
  • mto: This revision was merged to the branch mainline in revision 14547.
  • Revision ID: curtis.hovey@canonical.com-20111218151307-sdm2gzobt5tplbe0
Moved badges to lp.app.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
Let's inspect the PackageDiff record created.
35
35
 
36
 
    >>> from lp.services.webapp.testing import verifyObject
 
36
    >>> from canonical.launchpad.webapp.testing import verifyObject
37
37
    >>> from lp.soyuz.interfaces.packagediff import IPackageDiff
38
38
 
39
39
    >>> verifyObject(IPackageDiff, package_diff)
116
116
 
117
117
    >>> from lp.soyuz.model.component import (
118
118
    ...     ComponentSelection)
119
 
    >>> from lp.services.librarian.model import LibraryFileAlias
 
119
    >>> from canonical.launchpad.database.librarian import LibraryFileAlias
120
120
    >>> from lp.soyuz.interfaces.component import IComponentSet
121
121
 
122
122
    >>> hoary = ubuntu.getSeries('hoary')
136
136
of a new source series for us. We can use this to avoid messing with
137
137
sampledata to create valid packages.
138
138
 
139
 
    >>> from lp.soyuz.tests.fakepackager import FakePackager
 
139
    >>> from canonical.launchpad.testing.fakepackager import FakePackager
140
140
    >>> login('foo.bar@canonical.com')
141
141
    >>> packager = FakePackager(
142
142
    ...     'biscuit', '1.0', 'foo.bar@canonical.com-passwordless.sec')
277
277
    >>> import subprocess
278
278
    >>> import tempfile
279
279
 
280
 
    >>> from lp.services.librarian.utils import copy_and_close
 
280
    >>> from canonical.librarian.utils import copy_and_close
281
281
 
282
282
    >>> def get_diff_results(diff):
283
283
    ...     lfa = diff.diff_content
377
377
to decompress the file and display it inline, which makes it easier
378
378
for users to view it.
379
379
 
380
 
    >>> from lp.services.webapp.url import urlparse
 
380
    >>> from canonical.launchpad.webapp.url import urlparse
381
381
    >>> parsed_url = urlparse(diff.diff_content.http_url)
382
382
    >>> netloc, path = parsed_url[1:3]
383
383
 
401
401
 
402
402
Let's flush all the updates done.
403
403
 
404
 
    >>> from lp.services.database.sqlbase import flush_database_updates
 
404
    >>> from canonical.database.sqlbase import flush_database_updates
405
405
    >>> flush_database_updates()
406
406
 
407
407
Those methods are useful when the callsites are not interested only in
643
643
    ...     '1.0-2', archive=foobar.archive)
644
644
    >>> transaction.commit()
645
645
 
646
 
    >>> from lp.services.librarianserver.testing.server import fillLibrarianFile
 
646
    >>> from canonical.librarian.testing.server import fillLibrarianFile
647
647
    >>> [orig, upload_diff, dsc] = pub.sourcepackagerelease.files
648
648
    >>> fillLibrarianFile(dsc.libraryfile.id)
649
649