/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/blackbox/test_commit.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 09:18:24 UTC
  • mfrom: (7131.10.4 related-bugs)
  • Revision ID: breezy.the.bot@gmail.com-20181116091824-yeroktjwy7nl3l1c
Support --bugs= argument to commit to link related bugs (not necessarily ones that were fixed).

Merged from https://code.launchpad.net/~jelmer/brz/related-bugs/+merge/355893

Show diffs side-by-side

added added

removed removed

Lines of Context:
568
568
        del properties['branch-nick']
569
569
        self.assertFalse('bugs' in properties)
570
570
 
 
571
    def test_bugs_sets_property(self):
 
572
        """commit --bugs=lp:234 sets the lp:234 revprop to 'related'."""
 
573
        tree = self.make_branch_and_tree('tree')
 
574
        self.build_tree(['tree/hello.txt'])
 
575
        tree.add('hello.txt')
 
576
        self.run_bzr('commit -m hello --bugs=lp:234 tree/hello.txt')
 
577
 
 
578
        # Get the revision properties, ignoring the branch-nick property, which
 
579
        # we don't care about for this test.
 
580
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
 
581
        properties = dict(last_rev.properties)
 
582
        del properties[u'branch-nick']
 
583
 
 
584
        self.assertEqual({u'bugs': 'https://launchpad.net/bugs/234 related'},
 
585
                         properties)
 
586
 
571
587
    def test_fixes_bug_sets_property(self):
572
588
        """commit --fixes=lp:234 sets the lp:234 revprop to 'fixed'."""
573
589
        tree = self.make_branch_and_tree('tree')