summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-09-08 04:13:20 (GMT)
committerSteven Knight <knight@baldmt.com>2002-09-08 04:13:20 (GMT)
commit596f9fa6bed4777348f005fb98f8b67dda93b515 (patch)
tree11bd1002ab9a696c48d99618473db80302dc5454
parent44e01f6fed5a00994123ee5dd1d61b228eddeb27 (diff)
downloadSCons-596f9fa6bed4777348f005fb98f8b67dda93b515.zip
SCons-596f9fa6bed4777348f005fb98f8b67dda93b515.tar.gz
SCons-596f9fa6bed4777348f005fb98f8b67dda93b515.tar.bz2
Eliminate an exception when using -U.
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/engine/SCons/Node/FS.py1
-rw-r--r--src/engine/SCons/Node/FSTests.py1
-rw-r--r--test/option--U.py10
4 files changed, 15 insertions, 0 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 1a00b43..ea65a0a 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -32,6 +32,9 @@ RELEASE 0.09 -
- Fix the ASPPCOM values for the GNU assembler.
(Bug reported by Brett Polivka.)
+ - Fix an exception thrown when a Default() directory was specified
+ when using the -U option.
+
From Anthony Roach:
- Fixed use of command lines with spaces in their arguments,
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index 96381e3..c4b220f 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -496,6 +496,7 @@ class Dir(Entry):
self.entries = {}
self.entries['.'] = self
self.entries['..'] = self.dir
+ self.cwd = self
self.builder = 1
self._sconsign = None
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index 3bba3f4..f87abe7 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -203,6 +203,7 @@ class FSTestCase(unittest.TestCase):
fs = SCons.Node.FS.FS()
d1 = fs.Dir('d1')
+ assert d1.cwd is d1, d1
f1 = fs.File('f1', directory = d1)
diff --git a/test/option--U.py b/test/option--U.py
index d2c518d..23e82b1 100644
--- a/test/option--U.py
+++ b/test/option--U.py
@@ -134,4 +134,14 @@ test.fail_test(os.path.exists(test.workpath('bar.out')))
test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
+# Make sure that a Default() directory doesn't cause an exception.
+test.subdir('sub4')
+
+test.write(['sub4', 'SConstruct'], """
+Default('.')
+""")
+
+test.run(chdir = 'sub4', arguments = '-U')
+
+
test.pass_test()