356
356
self.runbzr('revert --no-backup')
357
357
self.runbzr('merge ../b -r last:1..last:1 --merge-type weave')
358
358
self.runbzr('revert --no-backup')
359
self.runbzr('merge ../b -r last:1..last:1 --reprocess')
360
self.runbzr('revert --no-backup')
359
361
self.runbzr('merge ../b -r last:1')
360
362
self.check_file_contents('goodbye', 'quux')
361
363
# Merging a branch pulls its revision into the tree
460
462
self.runbzr('pull ../b')
461
463
self.runbzr('pull ../b')
466
"""Test the abilities of 'bzr ls'"""
468
def bzrout(*args, **kwargs):
469
kwargs['backtick'] = True
470
return self.runbzr(*args, **kwargs)
472
def ls_equals(value, *args):
473
out = self.runbzr(['ls'] + list(args), backtick=True)
474
self.assertEquals(out, value)
477
open('a', 'wb').write('hello\n')
480
bzr('ls --verbose --null', retcode=1)
483
ls_equals('? a\n', '--verbose')
484
ls_equals('a\n', '--unknown')
485
ls_equals('', '--ignored')
486
ls_equals('', '--versioned')
487
ls_equals('a\n', '--unknown', '--ignored', '--versioned')
488
ls_equals('', '--ignored', '--versioned')
489
ls_equals('a\0', '--null')
492
ls_equals('V a\n', '--verbose')
499
open('subdir/b', 'wb').write('b\n')
505
bzr('commit -m subdir')
513
, '--verbose', '--non-recursive')
515
# Check what happens in a sub-directory
527
, '--from-root', '--null')
530
, '--from-root', '--non-recursive')
534
# Check what happens when we supply a specific revision
535
ls_equals('a\n', '--revision', '1')
537
, '--verbose', '--revision', '1')
540
ls_equals('', '--revision', '1')
542
# Now try to do ignored files.
544
open('blah.py', 'wb').write('unknown\n')
545
open('blah.pyo', 'wb').write('ignored\n')
557
ls_equals('blah.pyo\n'
559
ls_equals('blah.py\n'
463
567
def test_locations(self):
464
568
"""Using and remembering different locations"""