/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/per_controldir/test_push.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 19:12:43 UTC
  • mfrom: (7490.7.6 work)
  • mto: (7490.7.7 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200322191243-yx8ils8lvfmfh7rq
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
        self.assertEqual(2, result.branch_push_result.new_revno)
100
100
        self.assertEqual(tree.branch.base, result.source_branch.base)
101
101
        self.assertEqual(dir.open_branch().base, result.target_branch.base)
 
102
 
 
103
    def test_push_tag_selector(self):
 
104
        tree, rev1 = self.create_simple_tree()
 
105
        try:
 
106
            tree.branch.tags.set_tag('tag1', rev1)
 
107
        except TagsNotSupported:
 
108
            raise TestNotApplicable('tags not supported')
 
109
        tree.branch.tags.set_tag('tag2', rev1)
 
110
        dir = self.make_repository('dir').controldir
 
111
        dir.push_branch(tree.branch, tag_selector=lambda x: x == 'tag1')
 
112
        self.assertEqual({'tag1': rev1}, dir.open_branch().tags.get_tag_dict())