<pre style='margin:0'>
Mojca Miklavec (mojca) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/ee6fbfdfd0aec8c5918138591b736b7337218fff">https://github.com/macports/macports-base/commit/ee6fbfdfd0aec8c5918138591b736b7337218fff</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new ee6fbfd Remove trailing spaces
</span>ee6fbfd is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ee6fbfdfd0aec8c5918138591b736b7337218fff
</span>Author: Mojca Miklavec <mojca@macports.org>
AuthorDate: Tue Oct 2 22:49:25 2018 +0200
<span style='display:block; white-space:pre;color:#404040;'> Remove trailing spaces
</span>---
src/pextlib1.0/fs-traverse.c | 18 ++++-----
src/pextlib1.0/tests/fs-traverse.tcl | 72 ++++++++++++++++++------------------
2 files changed, 45 insertions(+), 45 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/fs-traverse.c b/src/pextlib1.0/fs-traverse.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 026bf4c..704a3a2 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/fs-traverse.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/fs-traverse.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -19,7 +19,7 @@
</span> * 3. Neither the name of Apple Inc. nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -100,21 +100,21 @@ FsTraverseCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Ob
</span> }
break;
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> /* Parse remaining args */
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv_orig, "?-depth? ?-ignoreErrors? ?-tails? ?--? varname target-list body");
return TCL_ERROR;
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> varname = *objv;
++objv, --objc;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> listPtr = *objv;
++objv, --objc;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> body = *objv;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if ((rval = Tcl_ListObjGetElements(interp, listPtr, &lobjc, &lobjv)) == TCL_OK) {
char **entries;
char **iter;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -169,9 +169,9 @@ do_traverse(Tcl_Interp *interp, int flags, char * CONST *targets, Tcl_Obj *varna
</span> int rval = TCL_OK;
FTS *root_fts;
FTSENT *ent;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> root_fts = fts_open(targets, FTS_PHYSICAL /*| FTS_COMFOLLOW */| FTS_NOCHDIR | FTS_XDEV, &do_compare);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> while ((ent = fts_read(root_fts)) != NULL) {
switch (ent->fts_info) {
case FTS_D: /* directory in pre-order */
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -244,7 +244,7 @@ do_traverse(Tcl_Interp *interp, int flags, char * CONST *targets, Tcl_Obj *varna
</span> if (!(flags & F_IGNORE_ERRORS)) {
Tcl_SetErrno(ent->fts_errno);
Tcl_ResetResult(interp);
<span style='display:block; white-space:pre;background:#ffe0e0;'>- Tcl_AppendResult(interp, ent->fts_path, ": ", (char *)Tcl_PosixError(interp), NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Tcl_AppendResult(interp, ent->fts_path, ": ", (char *)Tcl_PosixError(interp), NULL);
</span> fts_close(root_fts);
return TCL_ERROR;
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/tests/fs-traverse.tcl b/src/pextlib1.0/tests/fs-traverse.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 0030c2f..3c80531 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/tests/fs-traverse.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/tests/fs-traverse.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,18 +5,18 @@
</span>
proc main {pextlibname} {
global trees errorInfo
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> load $pextlibname
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set root "/tmp/macports-pextlib-fs-traverse"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> file delete -force $root
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> setup_trees $root
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # make the directory root structure
make_root
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # perform tests
set result [catch {
# Basic fs-traverse test
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -25,52 +25,52 @@ proc main {pextlibname} {
</span> lappend output $file
}
check_output $output $trees(1)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test starting with a symlink
set output [list]
fs-traverse file $root/a/c/a {
lappend output $file
}
check_output $output $trees(sub1)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test starting with a slash-ended symlink
set output [list]
fs-traverse file $root/a/c/a/ {
lappend output [string map {// /} $file]
}
check_output $output $trees(sub2)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test -depth
set output [list]
fs-traverse -depth file $root {
lappend output $file
}
check_output $output $trees(2)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test multiple sources
set output [list]
fs-traverse file [list $root/a $root/b] {
lappend output $file
}
check_output $output $trees(3)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test multiple sources with -depth
set output [list]
fs-traverse -depth file [list $root/a $root/b] {
lappend output $file
}
check_output $output $trees(4)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Error raised for traversing directory that does not exist
if {![catch {fs-traverse file $root/does_not_exist {}}]} {
error "fs-traverse did not raise an error for a missing directory"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test -ignoreErrors
if {[catch {fs-traverse -ignoreErrors file $root/does_not_exist {}}]} {
error "fs-traverse raised an error despite -ignoreErrors"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test -ignoreErrors with multiple sources, make sure it still gets the sources after the error
if {[catch {
set output [list]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -81,7 +81,7 @@ proc main {pextlibname} {
</span> }]} {
error "fs-traverse raised an error despite -ignoreErrors"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test skipping parts of the tree
set output [list]
fs-traverse file $root {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -91,21 +91,21 @@ proc main {pextlibname} {
</span> lappend output $file
}
check_output $output $trees(5)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test -tails option
set output [list]
fs-traverse -tails file $root {
lappend output $file
}
check_output $output $trees(6) $root
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test -tails option with trailing slash
set output [list]
fs-traverse -tails file $root/ {
lappend output $file
}
check_output $output $trees(6) $root
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test -tails option with multiple paths
# It should error out
if {![catch {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -113,7 +113,7 @@ proc main {pextlibname} {
</span> }]} {
error "fs-traverse did not error when using multiple paths with -tails"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test cutting the traversal short
set output [list]
fs-traverse file $root {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -122,7 +122,7 @@ proc main {pextlibname} {
</span> break
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test using an array variable as varname
# It should error out
if {![catch {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -131,7 +131,7 @@ proc main {pextlibname} {
</span> }]} {
error "fs-traverse did not error when setting the variable"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Same test with -ignoreErrors
if {[catch {
array set aryvar {}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -139,24 +139,24 @@ proc main {pextlibname} {
</span> }]} {
error "fs-traverse errored out when setting the variable despite -ignoreErrors"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test using a malformed target list
if {![catch {fs-traverse file "$root/a \{$root/b" {}}]} {
error "fs-traverse did not error with malformed target list"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test again with -ignoreErrors - this is the one case where it should still error
if {![catch {fs-traverse -ignoreErrors file "$root/a \{$root/b" {}}]} {
error "fs-traverse did not error with malformed target list using -ignoreErrors"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Test wacky variable name called -depth
set output [list]
fs-traverse -- -depth $root {
lappend output ${-depth}
}
check_output $output $trees(1)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # NOTE: This should be the last test performed, as it modifies the file tree
# Test to make sure deleting files during traversal works as expected
set output [list]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -171,10 +171,10 @@ proc main {pextlibname} {
</span> check_output $output $trees(5)
} errMsg]
set savedInfo $errorInfo
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Clean up
file delete -force $root
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Re-raise error if one occurred in the test block
if {$result} {
error $errMsg $savedInfo
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -222,9 +222,9 @@ proc make_root {} {
</span>
proc setup_trees {root} {
global trees
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> array set trees {}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set trees(1) "
$root directory
$root/a directory
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -252,11 +252,11 @@ proc setup_trees {root} {
</span> $root/b/c/b file
$root/b/c/c file
"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set trees(sub1) "
$root/a/c/a {link ../d}
"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set trees(sub2) "
$root/a/c/a/ {link ../d}
$root/a/c/a/a file
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -264,7 +264,7 @@ proc setup_trees {root} {
</span> $root/a/c/a/c directory
$root/a/c/a/d file
"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set trees(2) "
$root/a/a file
$root/a/b file
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -292,7 +292,7 @@ proc setup_trees {root} {
</span> $root/b directory
$root directory
"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set trees(3) "
$root/a directory
$root/a/a file
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -319,7 +319,7 @@ proc setup_trees {root} {
</span> $root/b/c/b file
$root/b/c/c file
"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set trees(4) "
$root/a/a file
$root/a/b file
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -346,7 +346,7 @@ proc setup_trees {root} {
</span> $root/b/c directory
$root/b directory
"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set trees(5) "
$root directory
$root/b directory
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -355,7 +355,7 @@ proc setup_trees {root} {
</span> $root/b/c/b file
$root/b/c/c file
"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set trees(6) "
. directory
a directory
</pre><pre style='margin:0'>
</pre>