diff options
-rw-r--r-- | src/CHANGES.txt | 4 | ||||
-rw-r--r-- | src/engine/SCons/Tool/CVS.py | 2 | ||||
-rw-r--r-- | test/CVS.py | 21 |
3 files changed, 18 insertions, 9 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 40fdbbb..8426798 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 f16376b..b3bd166 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 1ce28d6..85e11fe 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))) |