Changeset 1265 in tailor for vcpx/tests/tailor.py
- Timestamp:
- 08/25/06 00:46:37 (7 years ago)
- Hash name:
- 20060824224637-97f81-b1c3ff2bc67466cc3d7b6cdb68c0afa013e11783
- File:
-
- 1 edited
-
vcpx/tests/tailor.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/tests/tailor.py
r1261 r1265 290 290 repository = file://%(testdir)s/cvsdirtest.svnrepo 291 291 292 [svnresurdirtest] 293 target = svn:cvsresurdirtest 294 start-revision = INITIAL 295 root-directory = %(testdir)s/cvsresurdirtest/cvs2svn 296 source = cvs:cvsresurdirtest 297 subdir = test-work 298 299 [cvs:cvsresurdirtest] 300 module = test 301 repository = %(testdir)s/cvsresurdirtest.cvsrepo 302 303 [svn:cvsresurdirtest] 304 module = test 305 repository = file://%(testdir)s/cvsresurdirtest.svnrepo 306 292 307 ''' 293 308 … … 609 624 t = Tailorizer("svndirtest", self.config) 610 625 t() 626 627 628 class CvsReappearedDirectory(OperationalTest): 629 """Test problems with resurrected directories.""" 630 631 def setUp(self): 632 """Create a CVS repository that has the difficult history.""" 633 634 from os import mkdir, getcwd 635 from os.path import join, exists 636 from time import sleep 637 from shutil import rmtree 638 639 super(CvsReappearedDirectory, self).setUp() 640 641 repodir = join(self.TESTDIR, 'cvsresurdirtest.cvsrepo') 642 basedir = join(self.TESTDIR, 'cvsresurdirtest') 643 644 if not exists(repodir): 645 mkdir(basedir) 646 mkdir(repodir) 647 startdir = join(basedir, 'start') 648 mkdir(startdir) 649 650 cvs = ExternalCommand(cwd=startdir, nolog=True, command=['cvs', '-d', repodir]) 651 cvs.execute('init') 652 653 open(join(startdir, 'foo'), "w").close() 654 655 cvs.execute('import', '-m', 'one', 'test', 'test', 'test1') 656 657 workdir = join(basedir, 'work') 658 cvs.execute('checkout', '-d', workdir, 'test') 659 660 cvs = ExternalCommand(cwd=workdir, nolog=True, command=['cvs']) 661 bardir = join(workdir, 'bar') 662 mkdir(bardir) 663 baz = join(bardir, 'baz') 664 open(baz, "w").close() 665 666 cvs.execute('add', bardir, baz) 667 cvs.execute('commit', '-m', 'two', baz) 668 sleep(1) 669 670 cvs.execute('rm', '-f', baz) 671 cvs.execute('commit', '-m', 'three', baz) 672 cvs.execute('update', '-dP') 673 sleep(1) 674 675 mkdir(bardir) 676 again = join(bardir, 'again') 677 open(again, "w").close() 678 679 cvs.execute('add', bardir, again) 680 cvs.execute('commit', '-m', 'four', again) 681 682 def testCvsReapperedDirectoryToSubversion(self): 683 """Test that we can handle resurrected cvs directory to svn.""" 684 685 t = Tailorizer("svnresurdirtest", self.config) 686 t() 687 688 svnls = ExternalCommand(nolog=False, command=['svn', 'ls']) 689 manifest = svnls.execute('file://%s/cvsresurdirtest.svnrepo/test/bar' % self.TESTDIR, 690 stdout=PIPE)[0] 691 self.assertEqual(manifest.read(), "again\n")
Note: See TracChangeset
for help on using the changeset viewer.
