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

  • Committer: Jelmer Vernooij
  • Date: 2018-03-24 17:48:04 UTC
  • mfrom: (6921 work)
  • mto: This revision was merged to the branch mainline in revision 6923.
  • Revision ID: jelmer@jelmer.uk-20180324174804-xf22o05byoj12x1q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
        with open('hello', 'w') as f: f.write('hello world')
90
90
        wt.add('hello')
91
91
        rev1 = wt.commit(message='add hello')
92
 
        file_id = wt.path2id('hello')
93
92
 
94
93
        with open('hello', 'w') as f: f.write('version 2')
95
94
        rev2 = wt.commit(message='commit 2')
436
435
                message="base", allow_pointless=True, rev_id='B',
437
436
                working_tree=wt)
438
437
            def sign(text):
439
 
                return breezy.gpg.LoopbackGPGStrategy(None).sign(text)
 
438
                return breezy.gpg.LoopbackGPGStrategy(None).sign(
 
439
                        text, breezy.gpg.MODE_CLEAR)
440
440
            self.assertEqual(sign(Testament.from_revision(branch.repository,
441
441
                                                          'B').as_short_text()),
442
442
                             branch.repository.get_signature_text('B'))
616
616
        tree.remove(['a', 'b'])
617
617
        tree.commit('removed a', specific_files='a')
618
618
        basis = tree.basis_tree()
619
 
        tree.lock_read()
620
 
        try:
621
 
            self.assertIs(None, basis.path2id('a'))
622
 
            self.assertFalse(basis.path2id('b') is None)
623
 
        finally:
624
 
            tree.unlock()
 
619
        with tree.lock_read():
 
620
            self.assertFalse(basis.is_versioned('a'))
 
621
            self.assertTrue(basis.is_versioned('b'))
625
622
 
626
623
    def test_commit_saves_1ms_timestamp(self):
627
624
        """Passing in a timestamp is saved with 1ms resolution"""