[24418] trunk/base
source_changes at macosforge.org
source_changes at macosforge.org
Mon Apr 23 23:13:30 PDT 2007
Revision: 24418
http://trac.macosforge.org/projects/macports/changeset/24418
Author: eridius at macports.org
Date: 2007-04-23 23:13:30 -0700 (Mon, 23 Apr 2007)
Log Message:
-----------
Clarify how fs-traverse handles symbolic links. Currently fs-traverse does not actually behave in the now-documented fashion, but the fts re-write will
Modified Paths:
--------------
trunk/base/doc/portfile.7
trunk/base/src/pextlib1.0/tests/fs-traverse.tcl
Modified: trunk/base/doc/portfile.7
===================================================================
--- trunk/base/doc/portfile.7 2007-04-24 06:10:16 UTC (rev 24417)
+++ trunk/base/doc/portfile.7 2007-04-24 06:13:30 UTC (rev 24418)
@@ -1501,6 +1501,11 @@
.Nm continue
is called during execution, the current file and any children are skipped
and traversal continues with the next file/directory.
+
+If
+.Nm fs-traverse
+is called directly on a symbolic link, the link will be followed. All other
+links encountered during traversal will not be followed.
.Bl -tag -width indent
.It Fl depth
Equivalent to the
Modified: trunk/base/src/pextlib1.0/tests/fs-traverse.tcl
===================================================================
--- trunk/base/src/pextlib1.0/tests/fs-traverse.tcl 2007-04-24 06:10:16 UTC (rev 24417)
+++ trunk/base/src/pextlib1.0/tests/fs-traverse.tcl 2007-04-24 06:13:30 UTC (rev 24418)
@@ -4,7 +4,7 @@
# tclsh fs-traverse.tcl <Pextlib name>
proc main {pextlibname} {
- global tree1 tree2 tree3 tree4 errorInfo
+ global tree1 sub_tree1 tree2 tree3 tree4 errorInfo
load $pextlibname
@@ -26,6 +26,13 @@
}
check_output $output $tree1
+ # Test starting with a symlink
+ set output [list]
+ fs-traverse file $root/a/c/a {
+ lappend output $file
+ }
+ check_output $output $sub_tree1
+
# Test -depth
set output [list]
fs-traverse -depth file $root {
@@ -119,7 +126,7 @@
}
proc setup_trees {root} {
- global tree1 tree2 tree3 tree4
+ global tree1 sub_tree1 tree2 tree3 tree4
set tree1 "
$root directory
@@ -149,6 +156,14 @@
$root/b/c/c file
"
+ set sub_tree1 "
+ $root/a/d directory
+ $root/a/d/a file
+ $root/a/d/b {link ../../b/a}
+ $root/a/d/c directory
+ $root/a/d/d file
+ "
+
set tree2 "
$root/a/a file
$root/a/b file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070423/64bf1730/attachment.html
More information about the macports-changes
mailing list