~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_update.py

  • Committer: Robert Collins
  • Date: 2010-05-06 07:48:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506074822-0bsgf2j4h8jx0xkk
Added ``bzrlib.tests.matchers`` as a place to put matchers, along with
our first in-tree matcher. See the module docstring for details.
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
359
359
2>Updated to revision 2 of branch .../master
360
360
''')
361
361
 
362
 
    def test_update_show_base(self):
363
 
        """bzr update support --show-base
364
 
 
365
 
        see https://bugs.launchpad.net/bzr/+bug/202374"""
366
 
 
367
 
        tree=self.make_branch_and_tree('.')
368
 
 
369
 
        f = open('hello','wt')
370
 
        f.write('foo')
371
 
        f.close()
372
 
        tree.add('hello')
373
 
        tree.commit('fie')
374
 
 
375
 
        f = open('hello','wt')
376
 
        f.write('fee')
377
 
        f.close()
378
 
        tree.commit('fee')
379
 
 
380
 
        #tree.update() gives no such revision, so ...
381
 
        self.run_bzr(['update','-r1'])
382
 
 
383
 
        #create conflict
384
 
        f = open('hello','wt')
385
 
        f.write('fie')
386
 
        f.close()
387
 
 
388
 
        out, err = self.run_bzr(['update','--show-base'],retcode=1)
389
 
 
390
 
        # check for conflict notification
391
 
        self.assertContainsString(err,
392
 
                                  ' M  hello\nText conflict in hello\n1 conflicts encountered.\n')
393
 
        
394
 
        self.assertEqualDiff('<<<<<<< TREE\n'
395
 
                             'fie||||||| BASE-REVISION\n'
396
 
                             'foo=======\n'
397
 
                             'fee>>>>>>> MERGE-SOURCE\n',
398
 
                             open('hello').read())
399
 
 
400
362
    def test_update_checkout_prevent_double_merge(self):
401
363
        """"Launchpad bug 113809 in bzr "update performs two merges"
402
364
        https://launchpad.net/bugs/113809"""