/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-02-16 19:38:39 UTC
  • mfrom: (6852.3.1 is-versioned)
  • Revision ID: jelmer@jelmer.uk-20180216193839-a0efzmp1o64g86ln
Merge lp:~jelmer/brz/is-versioned.

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')
616
615
        tree.remove(['a', 'b'])
617
616
        tree.commit('removed a', specific_files='a')
618
617
        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()
 
618
        with tree.lock_read():
 
619
            self.assertFalse(basis.is_versioned('a'))
 
620
            self.assertTrue(basis.is_versioned('b'))
625
621
 
626
622
    def test_commit_saves_1ms_timestamp(self):
627
623
        """Passing in a timestamp is saved with 1ms resolution"""