~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository/test_revision.py

  • Committer: Vincent Ladeuil
  • Date: 2017-01-17 13:48:10 UTC
  • mfrom: (6615.3.6 merges)
  • mto: This revision was merged to the branch mainline in revision 6620.
  • Revision ID: v.ladeuil+lp@free.fr-20170117134810-j9p3lidfy6pfyfsc
Merge 2.7, resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2008, 2009, 2011, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
37
37
                 rev_id='test@user-1')
38
38
        rev = b.repository.get_revision('test@user-1')
39
39
        self.assertTrue('flavor' in rev.properties)
40
 
        self.assertEquals(rev.properties['flavor'], 'choc-mint')
41
 
        self.assertEquals([('branch-nick', 'Nicholas'),
 
40
        self.assertEqual(rev.properties['flavor'], 'choc-mint')
 
41
        self.assertEqual([('branch-nick', 'Nicholas'),
42
42
                           ('condiment', 'orange\n  mint\n\tcandy'),
43
43
                           ('empty', ''),
44
44
                           ('flavor', 'choc-mint'),
69
69
        tree1 = self.make_branch_and_tree("br1")
70
70
 
71
71
        # create a revision
72
 
        tree1.commit(message="quux", allow_pointless=True, committer="jaq",
73
 
                     revprops={'empty':'',
74
 
                               'value':'one',
75
 
                               'unicode':u'\xb5',
76
 
                               'multiline':'foo\nbar\n\n'
77
 
                              })
78
 
        self.assertTrue(len(tree1.branch.revision_history()) > 0)
 
72
        rev1 = tree1.commit(message="quux", allow_pointless=True,
 
73
            committer="jaq",
 
74
            revprops={'empty':'',
 
75
                      'value':'one',
 
76
                      'unicode':u'\xb5',
 
77
                      'multiline':'foo\nbar\n\n'
 
78
                      })
 
79
        self.assertEqual(tree1.branch.last_revision(), rev1)
79
80
        rev_a = tree1.branch.repository.get_revision(
80
81
                            tree1.branch.last_revision())
81
82