~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testlog.py

  • Committer: Robert Collins
  • Date: 2005-09-28 09:35:50 UTC
  • mfrom: (1185.1.47)
  • Revision ID: robertc@robertcollins.net-20050928093550-3ca194dfaffc79f1
merge from integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
            self.assertEquals(expected, got)
66
66
 
67
67
    def test_cur_revno(self):
68
 
        b = Branch('.', init=True)
 
68
        b = Branch.initialize('.')
69
69
 
70
70
        lf = LogCatcher()
71
71
        b.commit('empty commit')
86
86
    def test_simple_log(self):
87
87
        eq = self.assertEquals
88
88
        
89
 
        b = Branch('.', init=True)
 
89
        b = Branch.initialize('.')
90
90
 
91
91
        lf = LogCatcher()
92
92
        show_log(b, lf)
132
132
        self.log('log 2 delta: %r' % d)
133
133
        # self.checkDelta(d, added=['hello'])
134
134
        
 
135
        # commit a log message with control characters
 
136
        msg = "All 8-bit chars: " +  ''.join([unichr(x) for x in range(256)])
 
137
        b.commit(msg)
 
138
        lf = LogCatcher()
 
139
        show_log(b, lf, verbose=True)
 
140
        committed_msg = lf.logs[0].rev.message
 
141
        self.log("escaped commit message: %r", committed_msg)
 
142
        self.assert_(msg != committed_msg)
 
143
        self.assert_(len(committed_msg) > len(msg))