Sat Jan  5 13:17:51 EST 2008  Mark Stosberg <[EMAIL PROTECTED]>
  * refactor: improve style and portability of pull.pl test script.
      Many direct system calls were eliminated. No functional changes.  
New patches:

[refactor: improve style and portability of pull.pl test script.
Mark Stosberg <[EMAIL PROTECTED]>**20080105181751
     Many direct system calls were eliminated. No functional changes.  
] {
hunk ./tests/pull.pl 5
-use Test::More qw/no_plan/;
-use lib ('lib/perl');
+use Test::More 'no_plan';
+use lib 'lib/perl';
hunk ./tests/pull.pl 9
+use warnings;
hunk ./tests/pull.pl 11
-use vars qw/$DARCS/;
-use POSIX qw/getuid/;
-
-die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
-$DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
+use POSIX 'getuid';
hunk ./tests/pull.pl 15
-`mkdir -p temp1 temp2/one/two`;
-chdir 'temp1';
-`$DARCS init`;
-chdir '../temp2';
-`$DARCS init`;
-chdir 'one/two';
+ok(mkpath('temp1'), "temp1 created");
+ok(mkpath('temp2/one/two'), "temp2/one/two created");
+ok(chdir('temp1'), "chdir temp1");
+darcs 'init';
+ok(chdir('../temp2'), "chdir ../temp2");
+darcs 'init';
+ok(chdir('one/two'), "chdir one/two");
hunk ./tests/pull.pl 25
-    my $pull_out = `$DARCS pull -a ../../../temp1 2>&1`;
+    my $pull_out = darcs 'pull -a ../../../temp1';
hunk ./tests/pull.pl 29
-my $test_name = 'darcs pull should pull into repo specified with --repo';
-chdir '../../';  # now in temp2
-`$DARCS add one`;
-`$DARCS record --patch-name 'uno' --all --author [EMAIL PROTECTED];
-chdir '../';     # now outside of any repo
-like(`$DARCS pull --repodir temp1 --all ../temp2`, # temp2 is relative to temp1
-	qr/Finished pulling./i, $test_name);
+{
+    my $test_name = 'darcs pull should pull into repo specified with --repo';
+    chdir '../../';  # now in temp2
+    darcs 'add one';
+    darcs q(record --patch-name 'uno' --all --author [EMAIL PROTECTED]);
+    chdir '../';     # now outside of any repo
+    like(darcs('pull --repodir temp1 --all ../temp2'), # temp2 is relative to temp1
+        qr/Finished pulling./i, $test_name);
+}
hunk ./tests/pull.pl 42
-    `$DARCS add --repodir ./temp2 one/date.t`;
-    `$DARCS record --repodir ./temp2 --author [EMAIL PROTECTED] -a -m 'foo'`;
+    darcs 'add --repodir ./temp2 one/date.t';
+    darcs q(record --repodir ./temp2 --author [EMAIL PROTECTED] -a -m 'foo');
hunk ./tests/pull.pl 46
-    `chmod -w ./temp1/one/`;
-    my $out = `$DARCS pull --repodir ./temp1 -a 2>&1`;
+   chmod '0555','./temp1/one/'; # remove read permissions
+    my $out = darcs 'pull --repodir ./temp1 -a 2>&1';
hunk ./tests/pull.pl 73
-    like(`$DARCS pull -a $abs_path 2>&1`, qr/Can.t pull from current repository!/i, $test_name);
-    like(`$DARCS pull -a . 2>&1`, qr/Can.t pull from current repository!/i, $test_name);
+    like(darcs(qq(pull -a $abs_path)), qr/Can.t pull from current repository!/i, $test_name);
+    like(darcs('pull -a .'), qr/Can.t pull from current repository!/i, $test_name);
hunk ./tests/pull.pl 84
-    like(`$DARCS pull 2>&1`, qr/please specify one/i, $test_name);
+    like(darcs('pull'), qr/please specify one/i, $test_name);
hunk ./tests/pull.pl 86
-    like(`$DARCS pull 2>&1`, qr/Can.t pull from current repository!/i, '[issue358] '.$test_name);
-    unlike(`$DARCS pull ../* 2>&1`, qr/Can.t pull from current repository!/i, '[issue427] '.$test_name);
+    like(darcs('pull'), qr/Can.t pull from current repository!/i, '[issue358] '.$test_name);
+    unlike(darcs('pull ../*'), qr/Can.t pull from current repository!/i, '[issue427] '.$test_name);
hunk ./tests/pull.pl 103
-    rmtree('temp2/');
+    rmtree 'temp2/';
hunk ./tests/pull.pl 105
-    chdir('temp2');
+    chdir 'temp2';
hunk ./tests/pull.pl 108
-    `$DARCS revert -a`;
-    my $pull_out = `$DARCS pull -a ../temp1 2>&1`;
+    darcs 'revert -a';
+    my $pull_out = darcs 'pull -a ../temp1';
hunk ./tests/pull.pl 150
-rmtree('temp1');
+rmtree 'temp1';
hunk ./tests/pull.pl 154
-rmtree('temp2');
+rmtree 'temp2';
}

Context:

[add feature requested in issue576.
David Roundy <[EMAIL PROTECTED]>**20080105150125] 
[fix bug in issue576.
David Roundy <[EMAIL PROTECTED]>**20080105144929] 
[add test that triggers bug in issue576.
David Roundy <[EMAIL PROTECTED]>**20080105144812] 
[add configure support for libwww.
David Roundy <[EMAIL PROTECTED]>**20080104201255] 
[make bug message more explicit.
David Roundy <[EMAIL PROTECTED]>**20080104004253] 
[Initial implementation of HTTP pipelining using libwww.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20071222144902] 
[make indent slightly more concise using lines and unlines.
David Roundy <[EMAIL PROTECTED]>**20080104003953] 
[Make sure we test the 'darcs' we just built and not one in a global path.
Mark Stosberg <[EMAIL PROTECTED]>**20080102002235
     This done by using "$DARCS" instead of 'darcs'.
     However, in my case the updated test FAILS unexplainably with 2.0.0pre3,
     by failing to detect that a file has changed. 
     If I follow along in a shell and run the same commands with Darcs 2, 
     the problem does not appear. 
] 
[refactor: replace recursive indent with more concise find-and-replace syntax
Mark Stosberg <[EMAIL PROTECTED]>**20080101200447] 
[issue347 - document that single quotes should be used in .darcs/defaults
Mark Stosberg <[EMAIL PROTECTED]>**20080101164428] 
[simplify (and debug) pending handling.
David Roundy <[EMAIL PROTECTED]>**20071227133618
 Note that this change could lead to performance regressions, but I believe
 that these regressions would be strongly bounded (never worse than a
 whatsnew), and this simplification makes the code much easier to safely
 modify.
] 
[make updating of pending on pull much more efficient.
David Roundy <[EMAIL PROTECTED]>**20071224131059] 
[simplify a bit of code.
David Roundy <[EMAIL PROTECTED]>**20071224131023] 
[fix type-witness bug in HopefullyPrivate.
David Roundy <[EMAIL PROTECTED]>**20071223141149] 
[simplify Get
David Roundy <[EMAIL PROTECTED]>**20071223025108] 
[simplify tentativelyAddPatch by removing unused return value.
David Roundy <[EMAIL PROTECTED]>**20071223024400] 
[simplify away np2prims and nps2prims.
David Roundy <[EMAIL PROTECTED]>**20071223022145] 
[try to avoid rewriting patches that we've just read.
David Roundy <[EMAIL PROTECTED]>**20071222190029] 
[generalize CommandsAux utility functions.
David Roundy <[EMAIL PROTECTED]>**20071222162952] 
[add new instances for PatchInfoAnd.
David Roundy <[EMAIL PROTECTED]>**20071222144439] 
[change tentativelyAddPatch to accept a PatchInfoAnd p.
David Roundy <[EMAIL PROTECTED]>**20071222140517] 
[internal prepration for optimization saving patch writing.
David Roundy <[EMAIL PROTECTED]>**20071222134834] 
[add changelog entry.
David Roundy <[EMAIL PROTECTED]>**20071219162646] 
[add fixme indicating where the code could be simplified.
David Roundy <[EMAIL PROTECTED]>**20071221135649] 
[make reading of hashed inventories lazier.
David Roundy <[EMAIL PROTECTED]>**20071221133453] 
[resolve conflicts in mv_and_remove_tests.sh.
David Roundy <[EMAIL PROTECTED]>**20071219144638] 
[Fix !(...|...) in mv_and_remove_tests.sh.
Dave Love <[EMAIL PROTECTED]>**20071218001826
 Assume the original construct should have been `! ... | ...' and
 replace with a portable version of that.
] 
[[issue571] Redo last HAVE_TERMIO_H fix.
Dave Love <[EMAIL PROTECTED]>**20071218140508
 Not the most direct fix, but simpler.
] 
[Fix configure test for gadt type witnesses.
Dave Love <[EMAIL PROTECTED]>**20071218120139] 
[use --ignore-times in all tests.
David Roundy <[EMAIL PROTECTED]>**20071217225159
 This is because the hashed repository is a bit pickier, in that
 it no longer checks file lengths when the file modification times
 match.
] 
[enable modification time checking on hashed repositories.
David Roundy <[EMAIL PROTECTED]>**20071217220237] 
[Pass two args to `cmp' in tests, following POSIX.
Dave Love <[EMAIL PROTECTED]>**20071216180503
 Fixes some failures on Solaris.
] 
[resolve silly conflict with myself.
David Roundy <[EMAIL PROTECTED]>**20071217200855] 
[clean up SelectChanges (eliminating Bools)
David Roundy <[EMAIL PROTECTED]>**20071217191809] 
[make a few more files compile with type witnesses.
David Roundy <[EMAIL PROTECTED]>**20071217183234] 
[fix bug in revert (in writing the unrevert file).
David Roundy <[EMAIL PROTECTED]>**20071216215225] 
[make a few more files compile with type witnesses.
David Roundy <[EMAIL PROTECTED]>**20071217164815] 
[remove tabs.
David Roundy <[EMAIL PROTECTED]>**20071216224617] 
[bump version number preemptively to 2.0.0pre3.
David Roundy <[EMAIL PROTECTED]>**20071216222823] 
[fix doc bug in show contents.
David Roundy <[EMAIL PROTECTED]>**20071216214002] 
[TAG 2.0.0pre2
David Roundy <[EMAIL PROTECTED]>**20071216201647] 
Patch bundle hash:
b57af90a53c650479a5493386d08e632d1d4f57f
_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to