Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove "There are no outstanding operations to perform" warning.

This is more in keeping with the UNIX convention of no output on success,
and is also the way Stow v1.x behaved.  Thanks to Adam Sampson for the suggestion.
  • Loading branch information...
commit 8357dca6451729f05eb0d2018ff014c3fa63c883 1 parent d51ff05
Adam Spiers authored
4 NEWS
View
@@ -1,5 +1,9 @@
News file for Stow.
+* Changes in version 2.1.4
+
+** Remove "There are no outstanding operations to perform" warning.
+
* Changes in version 2.1.3
** New --adopt / -a option
1  THANKS
View
@@ -22,3 +22,4 @@ Austin Wood <austin.wood@rmit.edu.au>
Christopher Hoobin <christopher.hoobin.edu.au>
Adam Spiers <stow@adamspiers.org>
Stefano Lattarini
+Adam Sampson
1  lib/Stow.pm.in
View
@@ -1391,7 +1391,6 @@ sub process_tasks {
$self->{tasks} = [ grep { $_->{action} ne 'skip' } @{ $self->{tasks} } ];
if (not @{ $self->{tasks} }) {
- warn "There are no outstanding operations to perform.\n";
return;
}
15 t/stow.t
View
@@ -161,8 +161,7 @@ make_file('../stow/pkg4c/bin4c/file4c', "bin4c/file4c - version originally in st
$stow->plan_stow('pkg4c');
is($stow->get_conflict_count, 0 => 'no conflicts with --adopt');
-my @tasks = $stow->get_tasks;
-is(@tasks, 4 => 'two tasks per file');
+is($stow->get_tasks, 4 => 'two tasks per file');
$stow->process_tasks();
for my $file ('file4c', 'bin4c/file4c') {
ok(-l $file, "$file turned into a symlink");
@@ -287,11 +286,7 @@ make_dir('../stow/pkg10b/man10/man1');
make_file('../stow/pkg10b/man10/man1/file10.1');
$stow->plan_stow('pkg10b');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process'
-);
+is($stow->get_tasks, 0, 'no tasks to process');
ok(
$stow->get_conflict_count == 0 &&
readlink('man10/man1/file10.1') eq '../../../stow/pkg10a/man10/man1/file10.1'
@@ -371,11 +366,7 @@ make_dir('stow/pkg14/stow/pkg15');
make_file('stow/pkg14/stow/pkg15/node15');
$stow->plan_stow('pkg14');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process'
-);
+is($stow->get_tasks, 0, 'no tasks to process');
ok(
$stow->get_conflict_count == 0 &&
! -l 'stow/pkg15'
36 t/unstow.t
View
@@ -146,11 +146,7 @@ make_file('stow/pkg7a/stow/pkg7b/file7b');
make_link('stow/pkg7b', '../stow/pkg7a/stow/pkg7b');
$stow->plan_unstow('pkg7b');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg7b'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg7b');
ok(
$stow->get_conflict_count == 0 &&
-l 'stow/pkg7b' &&
@@ -172,11 +168,7 @@ make_file('stow/pkg8a/stow2/pkg8b/file8b');
make_link('stow2/pkg8b', '../stow/pkg8a/stow2/pkg8b');
$stow->plan_unstow('pkg8a');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg8a'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg8a');
ok(
$stow->get_conflict_count == 0 &&
-l 'stow2/pkg8b' &&
@@ -224,11 +216,7 @@ make_link('man10/man1/file10b.1' => '../../../stow/pkg10b/man10/man1/file10b.1'
make_dir('../stow/pkg10c/man10/man1');
make_file('../stow/pkg10c/man10/man1/file10a.1');
$stow->plan_unstow('pkg10c');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg10c'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg10c');
ok(
$stow->get_conflict_count == 0 &&
readlink('man10/man1/file10a.1') eq '../../../stow/pkg10a/man10/man1/file10a.1'
@@ -260,11 +248,7 @@ ok(
#
$stow = new_Stow();
$stow->plan_unstow('pkg12');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg12'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg12');
ok(
$stow->get_conflict_count == 0
=> 'unstow already unstowed package pkg12'
@@ -279,11 +263,7 @@ mkdir("$OUT_DIR/target");
$stow = new_Stow();
$stow->plan_unstow('pkg12');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg12 which was never stowed'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg12 which was never stowed');
ok(
$stow->get_conflict_count == 0
=> 'unstow never stowed package pkg12'
@@ -296,11 +276,7 @@ make_file('man12/man1/file12.1');
$stow = new_Stow();
$stow->plan_unstow('pkg12');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg12 for third time'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg12 for third time');
%conflicts = $stow->get_conflicts;
ok(
$stow->get_conflict_count == 1 &&
36 t/unstow_orig.t
View
@@ -152,11 +152,7 @@ make_file('stow/pkg7a/stow/pkg7b/file7b');
make_link('stow/pkg7b', '../stow/pkg7a/stow/pkg7b');
$stow->plan_unstow('pkg7b');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg7b'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg7b');
ok(
$stow->get_conflict_count == 0 &&
-l 'stow/pkg7b' &&
@@ -178,11 +174,7 @@ make_file('stow/pkg8a/stow2/pkg8b/file8b');
make_link('stow2/pkg8b', '../stow/pkg8a/stow2/pkg8b');
$stow->plan_unstow('pkg8a');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg8a'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg8a');
ok(
$stow->get_conflict_count == 0 &&
-l 'stow2/pkg8b' &&
@@ -230,11 +222,7 @@ make_link('man10/man1/file10b.1' => '../../../stow/pkg10b/man10/man1/file10b.1'
make_dir('../stow/pkg10c/man10/man1');
make_file('../stow/pkg10c/man10/man1/file10a.1');
$stow->plan_unstow('pkg10c');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg10c'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg10c');
ok(
$stow->get_conflict_count == 0 &&
readlink('man10/man1/file10a.1') eq '../../../stow/pkg10a/man10/man1/file10a.1'
@@ -266,11 +254,7 @@ ok(
#
$stow = new_compat_Stow();
$stow->plan_unstow('pkg12');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg12'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg12');
ok(
$stow->get_conflict_count == 0
=> 'unstow already unstowed package pkg12'
@@ -285,11 +269,7 @@ mkdir("$OUT_DIR/target");
$stow = new_compat_Stow();
$stow->plan_unstow('pkg12');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg12 which was never stowed'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg12 which was never stowed');
ok(
$stow->get_conflict_count == 0
=> 'unstow never stowed package pkg12'
@@ -302,11 +282,7 @@ make_file('man12/man1/file12.1');
$stow = new_compat_Stow();
$stow->plan_unstow('pkg12');
-stderr_like(
- sub { $stow->process_tasks(); },
- qr/There are no outstanding operations to perform/,
- 'no tasks to process when unstowing pkg12 for third time'
-);
+is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg12 for third time');
%conflicts = $stow->get_conflicts;
ok(
$stow->get_conflict_count == 1 &&
Please sign in to comment.
Something went wrong with that request. Please try again.