~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/whitebox.py

  • Committer: Martin Pool
  • Date: 2005-07-11 03:40:02 UTC
  • Revision ID: mbp@sourcefrog.net-20050711034002-575d84b4c7514542
- commit command refuses unless something is changed or --unchanged is given

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
class NoChanges(InTempDir):
24
24
    def runTest(self):
25
 
        from bzrlib.errors import EmptyCommit
 
25
        from bzrlib.errors import PointlessCommit
26
26
        
27
27
        b = Branch('.', init=True)
28
28
 
29
29
        self.build_tree(['hello.txt'])
30
30
 
31
 
        self.assertRaises(EmptyCommit,
 
31
        self.assertRaises(PointlessCommit,
32
32
                          b.commit,
33
33
                          'commit without adding',
34
 
                          allow_empty=False)
 
34
                          allow_pointless=False)
35
35
 
36
 
        b.commit('commit empty tree',
37
 
                 allow_empty=True)
 
36
        b.commit('commit pointless tree',
 
37
                 allow_pointless=True)
38
38
 
39
39
        b.add('hello.txt')
40
40
        
41
41
        b.commit('commit first added file',
42
 
                 allow_empty=False)
 
42
                 allow_pointless=False)
43
43
        
44
 
        self.assertRaises(EmptyCommit,
 
44
        self.assertRaises(PointlessCommit,
45
45
                          b.commit,
46
46
                          'commit after adding file',
47
 
                          allow_empty=False)
 
47
                          allow_pointless=False)
48
48
        
49
49
        b.commit('commit pointless revision with one file',
50
 
                 allow_empty=True)
 
50
                 allow_pointless=True)
51
51
 
52
52
        b.add_pending_merge('mbp@892739123-2005-123123')
53
53
        b.commit('commit new merge with no text changes',
54
 
                 allow_empty=False)
 
54
                 allow_pointless=False)
55
55
        
56
56
 
57
57