~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_commit.py

  • Committer: Martin Pool
  • Date: 2005-09-15 06:20:01 UTC
  • Revision ID: mbp@sourcefrog.net-20050915062001-e127244e78bc21cf
- fix handling of selective commit with deleted files

- test for this

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
 
93
93
    def test_selective_delete(self):
94
94
        """Selective commit in tree with deletions"""
 
95
        b = Branch('.', init=True)
 
96
        file('hello', 'w').write('hello')
 
97
        file('buongia', 'w').write('buongia')
 
98
        b.add(['hello', 'buongia'])
 
99
        b.commit(message='add files')
 
100
        
 
101
        os.remove('hello')
 
102
        file('buongia', 'w').write('new text')
 
103
        b.commit(message='update text',
 
104
                 specific_files=['buongia'],
 
105
                 allow_pointless=False)
 
106
 
 
107
        b.commit(message='remove hello',
 
108
                 specific_files=['hello'],
 
109
                 allow_pointless=False)
 
110
 
 
111
        eq = self.assertEquals
 
112
        eq(b.revno(), 3)
 
113
        
95
114
 
96
115
 
97
116
    def test_removed_commit(self):