~bzr-repo-push/bzr-repo-push/devel

« back to all changes in this revision

Viewing changes to test.py

  • Committer: Alexander Belchenko
  • Date: 2007-11-16 11:56:54 UTC
  • Revision ID: bialix@ukr.net-20071116115654-xxp8ldojtfhdfoy4
push update tags too (bug #110698)

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        self.assertEquals(branch.BzrBranchFormat5,
52
52
            branch.BranchFormat.find_format(br_b.bzrdir).__class__)
53
53
        self.assertEquals(['one-id'], br_b.revision_history())
 
54
 
 
55
    def test_repo_push_tags(self):
 
56
        # source
 
57
        src_repo = self.make_repository('src', shared=True)
 
58
        os.chdir('src')
 
59
        br_dir = bzrdir.BzrDir.create('branch')
 
60
        br_a = branch.BzrBranchFormat6().initialize(br_dir)
 
61
        wt = br_a.bzrdir.create_workingtree()
 
62
        self.build_tree(['branch/foo'])
 
63
        wt.add('foo')
 
64
        wt.commit('1', rev_id='one-id')
 
65
        # add tag
 
66
        br_a.tags.set_tag('mytag', 'one-id')
 
67
        # dest
 
68
        dest = self.make_repository('../dest', shared=True)
 
69
        # repo-push
 
70
        self.run_bzr('repo-push ../dest')
 
71
        # inspect tags
 
72
        br_b = branch.Branch.open_containing('../dest/branch')[0]
 
73
        self.assertEquals({'mytag': 'one-id'}, br_b.tags.get_tag_dict())