From ac8b275af6512a4f8ef9ea5ef43e88bf8dc00d80 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Mon, 7 Jul 2003 16:23:00 +0000 Subject: [PATCH] CVS fixes. git-svn-id: http://scons.tigris.org/svn/scons/trunk@735 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/CHANGES.txt | 4 ++++ src/engine/SCons/Tool/CVS.py | 2 +- test/CVS.py | 21 +++++++++++++-------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 40fdbbb3..8426798d 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -22,6 +22,10 @@ RELEASE 0.XX - XXX - Documentation fixes: typo in the man page. + - Use "cvs co -d" instead of "cvs co -p >" when checking out something + from CVS with a specified module name. This avoids zero-length + files when there is a checkout error. + From Gary Oberbrunner: - Report the target being built in error messages when building diff --git a/src/engine/SCons/Tool/CVS.py b/src/engine/SCons/Tool/CVS.py index f16376b9..b3bd1663 100644 --- a/src/engine/SCons/Tool/CVS.py +++ b/src/engine/SCons/Tool/CVS.py @@ -48,7 +48,7 @@ def generate(env): # Don't use os.path.join() because the name we fetch might # be across a network and must use POSIX slashes as separators. module = module + '/' - env['CVSCOM'] = '$CVS $CVSFLAGS co $CVSCOFLAGS -p $CVSMODULE${TARGET.posix} > $TARGET' + env['CVSCOM'] = '$CVS $CVSFLAGS co $CVSCOFLAGS -d ${TARGET.dir} $CVSMODULE${TARGET.posix}' return SCons.Builder.Builder(action = '$CVSCOM', env = env, overrides = {'CVSREPOSITORY':repos, diff --git a/test/CVS.py b/test/CVS.py index 1ce28d6d..85e11fea 100644 --- a/test/CVS.py +++ b/test/CVS.py @@ -192,27 +192,32 @@ test.write(['work2', 'sub', 'eee.in'], "work2/sub/eee.in\n") test.run(chdir = 'work2', arguments = '.', stdout = test.wrap_stdout(read_str = """\ -cvs -q -d %s co -p foo/sub/SConscript > %s -""" % (cvsroot, sub_SConscript), +cvs -q -d %s co -d sub foo/sub/SConscript +U sub/SConscript +""" % (cvsroot), build_str = """\ -cvs -q -d %s co -p foo/aaa.in > aaa.in +cvs -q -d %s co -d . foo/aaa.in +U ./aaa.in cat("aaa.out", "aaa.in") cat("bbb.out", "bbb.in") -cvs -q -d %s co -p foo/ccc.in > ccc.in +cvs -q -d %s co -d . foo/ccc.in +U ./ccc.in cat("ccc.out", "ccc.in") cat("all", ["aaa.out", "bbb.out", "ccc.out"]) -cvs -q -d %s co -p foo/sub/ddd.in > %s +cvs -q -d %s co -d sub foo/sub/ddd.in +U sub/ddd.in cat("%s", "%s") cat("%s", "%s") -cvs -q -d %s co -p foo/sub/fff.in > %s +cvs -q -d %s co -d sub foo/sub/fff.in +U sub/fff.in cat("%s", "%s") cat("%s", ["%s", "%s", "%s"]) """ % (cvsroot, cvsroot, - cvsroot, sub_ddd_in, + cvsroot, sub_ddd_out, sub_ddd_in, sub_eee_out, sub_eee_in, - cvsroot, sub_fff_in, + cvsroot, sub_fff_out, sub_fff_in, sub_all, sub_ddd_out, sub_eee_out, sub_fff_out))) -- 2.26.2