/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 bzrlib/tests/blackbox/test_log.py

  • Committer: Robert Collins
  • Date: 2010-05-06 11:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506110810-h3j07fh5gmw54s25
Cleaner matcher matching revised unlocking protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
        self.make_linear_branch()
159
159
        self.assertLogRevnos(['-c1'], ['1'])
160
160
 
161
 
    def test_branch_revspec(self):
162
 
        foo = self.make_branch_and_tree('foo')
163
 
        bar = self.make_branch_and_tree('bar')
164
 
        self.build_tree(['foo/foo.txt', 'bar/bar.txt'])
165
 
        foo.add('foo.txt')
166
 
        bar.add('bar.txt')
167
 
        foo.commit(message='foo')
168
 
        bar.commit(message='bar')
169
 
        self.run_bzr('log -r branch:../bar', working_dir='foo')
170
 
        self.assertEqual([bar.branch.get_rev_id(1)],
171
 
                         [r.rev.revision_id
172
 
                          for r in self.get_captured_revisions()])
173
 
 
174
 
 
175
 
class TestLogExcludeCommonAncestry(TestLogWithLogCatcher):
176
 
 
177
 
    def test_exclude_common_ancestry_simple_revnos(self):
178
 
        self.make_linear_branch()
179
 
        self.assertLogRevnos(['-r1..3', '--exclude-common-ancestry'],
180
 
                             ['3', '2'])
181
 
 
182
161
 
183
162
class TestLogMergedLinearAncestry(TestLogWithLogCatcher):
184
163
 
188
167
        # stop calling run_bzr, there is no point) --vila 100118.
189
168
        builder = branchbuilder.BranchBuilder(self.get_transport())
190
169
        builder.start_series()
191
 
        # 1
192
 
        # | \
193
 
        # 2  1.1.1
194
 
        # | / |
195
 
        # 3  1.1.2
196
 
        # |   |
197
 
        # |  1.1.3
198
 
        # | / |
199
 
        # 4  1.1.4
200
 
        # | /
201
 
        # 5
202
 
 
203
170
        # mainline
204
171
        builder.build_snapshot('1', None, [
205
172
            ('add', ('', 'root-id', 'directory', ''))])
381
348
 
382
349
    def test_log_bad_message_re(self):
383
350
        """Bad --message argument gives a sensible message
384
 
 
 
351
        
385
352
        See https://bugs.launchpad.net/bzr/+bug/251352
386
353
        """
387
354
        self.make_minimal_branch()
388
355
        out, err = self.run_bzr(['log', '-m', '*'], retcode=3)
389
 
        self.assertContainsRe(err, "ERROR.*Invalid pattern.*nothing to repeat")
390
 
        self.assertNotContainsRe(err, "Unprintable exception")
391
 
        self.assertEqual(out, '')
 
356
        self.assertEqual("bzr: ERROR: Invalid regular expression"
 
357
            " in log message filter"
 
358
            ": '*'"
 
359
            ": nothing to repeat\n", err)
 
360
        self.assertEqual('', out)
392
361
 
393
362
    def test_log_unsupported_timezone(self):
394
363
        self.make_linear_branch()