~ubuntu-branches/debian/sid/bzr-builddeb/sid

« back to all changes in this revision

Viewing changes to tests/blackbox/test_merge_upstream.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij, Jelmer Vernooij, Jonathan Riddell, Scott Kitterman
  • Date: 2011-07-15 12:15:22 UTC
  • Revision ID: james.westby@ubuntu.com-20110715121522-avtc0uc3uuzcg7zn
Tags: 2.7.5
[ Jelmer Vernooij ]
* New 'bzr dep3-patch' subcommand that can generate DEP-3 compliant
  patches. LP: #460576

[ Jonathan Riddell ]
* Use new set_commit_message() hook in bzr to set the commit
  message from debian/changelog and set fixed bugs in tags. LP: #707274

[ Jelmer Vernooij ]
* Add dependency on devscripts >= 2.10.59, required now that 'dch --
  package' is used. LP: #783122
* Fix support for native packages with dashes in their version in
  sources.list. LP: #796853
* Fix deprecation warnings for TestCase.failUnlessExists and
  TestCase.failIfExists in bzr 2.4.

[ Scott Kitterman ]
* Delete debian/bzr-builddeb.dirs so the long obsolete and empty
  /usr/lib/python2.4/site-packages/bzrlib/plugins/bzr-builddeb/ is no
  longer created. Closes: #631564

[ Jelmer Vernooij ]
* Add support for xz and lzma tarballs. LP: #553668
* When importing upstream component tarballs, don't repack bz2/lzma
  tarballs to gz if the package is in v3 source format. LP: #810531

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    DistributionBranch,
31
31
    DistributionBranchSet,
32
32
    )
 
33
from bzrlib.plugins.builddeb.util import (
 
34
    md5sum_filename,
 
35
    )
33
36
 
34
37
 
35
38
class Fixture(object):
88
91
        branchpath = test_case.getUniqueString()
89
92
        tree = self.upstream.tree.bzrdir.sprout(branchpath).open_workingtree()
90
93
        db = DistributionBranch(tree.branch, tree.branch, tree=tree,
91
 
                upstream_tree=tree)
 
94
                pristine_upstream_tree=tree)
92
95
        dbs = DistributionBranchSet()
93
96
        dbs.add_branch(db)
94
 
        db.import_upstream_tarball(self.tar.tarball, str(self.tar.version),
95
 
                [tree.branch.last_revision()])
 
97
        db.import_upstream_tarballs(
 
98
            [(self.tar.tarball, None, md5sum_filename(self.tar.tarball))],
 
99
            "foo",
 
100
            str(self.tar.version),
 
101
            [tree.branch.last_revision()])
96
102
        package_builder = SourcePackageBuilder("foo",
97
 
                str(self.tar.version)+"-1")
 
103
            str(self.tar.version)+"-1")
98
104
        package_builder.add_default_control()
99
105
        package_builder.write_debian_files(branchpath)
100
106
        tree.smart_add([tree.basedir])
196
202
        rel2 = self.release_upstream(changed_upstream)
197
203
        self.run_bzr(['merge-upstream', '--version', str(rel2.version),
198
204
            os.path.abspath(rel2.tarball)], working_dir=package.tree.basedir)
199
 
        self.failUnlessExists(os.path.join(package.tree.basedir, 'muhook'))
 
205
        self.assertPathExists(os.path.join(package.tree.basedir, 'muhook'))
200
206
 
201
207
    def test_new_package(self):
202
208
        upstream = self.make_upstream()