~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Marius Kruger
  • Date: 2007-04-14 11:57:26 UTC
  • mto: This revision was merged to the branch mainline in revision 2455.
  • Revision ID: amanic@gmail.com-20070414115726-kykcsm9pztykst1w
Revert test_too_much.py and just do the minimum te get the tests to pass.
Add some test to test_remove.py.
Let test_remove.py make safe id's.

Show diffs side-by-side

added added

removed removed

Lines of Context:
521
521
            runbzr('diff', retcode=1)
522
522
            self.assertEquals(self.capture("relpath d2/link1"), "d2/link1\n")
523
523
            runbzr(['commit', '-m', '4: retarget of two links'])
524
 
 
525
 
            # unversion
 
524
    
526
525
            runbzr('remove --keep d2/link1')
527
526
            self.assertEquals(self.capture('unknowns'), 'd2/link1\n')
528
 
            runbzr(['commit', '-m', '5: remove --keep d2/link1'])
529
 
            self.assertEquals(self.capture('unknowns'), 'd2/link1\n')
530
 
 
531
 
            # remove
 
527
            runbzr(['commit', '-m', '5: remove d2/link1'])
 
528
            # try with the rm alias
532
529
            runbzr('add d2/link1')
533
530
            runbzr(['commit', '-m', '6: add d2/link1'])
534
 
            runbzr('remove d2/link1')
535
 
            self.assertEquals(self.capture('unknowns'), '')
536
 
            self.assertTrue(self.capture('status --short d2/link1').find(
537
 
                'd2/link1') >= 0)
 
531
            runbzr('rm --keep d2/link1')
 
532
            self.assertEquals(self.capture('unknowns'), 'd2/link1\n')
538
533
            runbzr(['commit', '-m', '7: remove d2/link1'])
539
 
 
540
 
            # try with the rm alias
541
 
            os.symlink("TARGET 1", "d2/link1")
542
 
            runbzr('add d2/link1')
543
 
            runbzr(['commit', '-m', '8: add d2/link1'])
544
 
            runbzr('rm d2/link1')
545
 
            self.assertEquals(self.capture('unknowns'), '')
546
 
            self.assertTrue(self.capture('status --short d2/link1').find(
547
 
                'd2/link1') >= 0)
548
 
            runbzr(['commit', '-m', '9: unknown d2/link1'])
549
 
 
 
534
    
550
535
            os.mkdir("d1")
551
536
            runbzr('add d1')
552
537
            runbzr('rename d2/link3 d1/link3new')
553
 
            runbzr(['commit', '-m', '10: add d1, move/rename link3'])
 
538
            self.assertEquals(self.capture('unknowns'), 'd2/link1\n')
 
539
            runbzr(['commit', '-m', '8: remove d2/link1, move/rename link3'])
554
540
            
555
541
            runbzr(['check'])
556
542
            
588
574
            self.assert_(listdir_sorted("d2")== [ "link3" ])
589
575
            chdir("..")
590
576
            
591
 
            runbzr(['export', '-r', '10', 'exp6.tmp'])
 
577
            runbzr(['export', '-r', '8', 'exp6.tmp'])
592
578
            chdir("exp6.tmp")
593
579
            self.assertEqual(listdir_sorted("."), [ "d1", "d2", "link2"])
594
580
            self.assertEquals(listdir_sorted("d1"), [ "link3new" ])