Re: Subversion (was: Re: Upgrading without central packaging)

[prev] [thread] [next] [lurker] [Date index for 2005/04/26]

From: Michael G Schwern
Subject: Re: Subversion (was: Re: Upgrading without central packaging)
Date: 21:14 on 26 Apr 2005
--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Apr 26, 2005 at 03:01:23PM +0100, Robin Stephenson wrote:
> * When it does wedge it goes to some lengths to put the fear of God into 
> the user:
> 
> svn: Berkeley DB error while opening environment for filesystem /svn/db:
> DB_RUNRECOVERY: Fatal error, run database recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: Your commit message was left in a temporary file:
> svn: '/etc/svn-commit.2.tmp'

For god's sake man, switch to FSFS!
http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ch-5-sect-1.3

Hating subversion for still not making fsfs the default repo type and
requiring folks to use the devel branch to get at a sensible repo.


> I only really have one problem with this: how the hell am I expected to
> persuade a room full of Java developers that this is an improvement over
> CVS? I mean, it is, but it's just blimmin well not a big enough one.

svn mv.  Oh god, svn mv alone is enough reason.  Also per change revision
numbers, thank you!


> Finally, line endings. Oh, line endings. Eclipse's wild stabs in the 
> dark, FTP's binary vs ASCII transfer, Cygwin's weird mount thing, 
> getting everyone to delete their working copy to fix sticky tags in CVS, 
> rubbish Unix error messages ("bad interpreter?") -- I've just about had 
> it up to here.

svn:eol-style and svn:mime-type?
http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ch-7-sect-2.3.5

Or does that just add to the hate?


> Can anyone name a single piece of software that doesn't suck? There must 
> be some small, perfectly formed jewel out there that does something 
> useful, right? Right?

I've been liking darcs lately, no server to set up!  You go into your working
directory... darcs init; darcs add -r .;  darcs record; and go.  Want to make
the repo available?  Point a dumb ol web server at your working copy.  Not 
that it doesn't have its own hate.  The Worst Annotation Format In The 
Universe can be seen attached along with the file its annotating.


--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=us-ascii
Content-Description: add.pl-annotated
Content-Disposition: attachment; filename="add.pl-annotated"

# File tests/add.pl created by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
]  as ./tests/add.pl
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 #!/usr/bin/env perl
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 # Some tests for 'darcs add'
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 use lib qw(lib/perl);
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 
# Following line added by [Test::Darcs.  darcs() instead of `$DARCS ...`
# schwern@xxxxx.xxx**20050312031120
 
 All the perl tests repeat this mantra to find darcs:
 
   use vars qw/$DARCS/;
 
   die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
   $DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
 
 And then they call $DARCS directly via a shell command.  `$DARCS ...`
 Repeated code is bad and all that shell is likely to become a compatibility
 liability.
 
 This patch creats a library Test::Darcs and in it darcs() which replaces
 `$DARCS ...`.  I've converted add.pl to use it as a demonstration.
 
 One of the issues is now in order to run an individual Perl test file you
 must add -Ilib/perl so it can find Test::Darcs.  Alternatively one can 
 add "use lib qw(lib/perl)" to all the Perl tests.  I don't know which is
 better for darcs developers.  The latter is redundant but potentially less
 confusing.
 
 More testing libraries for tests/lib/perl to follow.
 
] 
 use Test::More qw/no_plan/;
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 
# Following line added by [Test::Darcs.  darcs() instead of `$DARCS ...`
# schwern@xxxxx.xxx**20050312031120
 
 All the perl tests repeat this mantra to find darcs:
 
   use vars qw/$DARCS/;
 
   die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
   $DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
 
 And then they call $DARCS directly via a shell command.  `$DARCS ...`
 Repeated code is bad and all that shell is likely to become a compatibility
 liability.
 
 This patch creats a library Test::Darcs and in it darcs() which replaces
 `$DARCS ...`.  I've converted add.pl to use it as a demonstration.
 
 One of the issues is now in order to run an individual Perl test file you
 must add -Ilib/perl so it can find Test::Darcs.  Alternatively one can 
 add "use lib qw(lib/perl)" to all the Perl tests.  I don't know which is
 better for darcs developers.  The latter is redundant but potentially less
 confusing.
 
 More testing libraries for tests/lib/perl to follow.
 
] 
 use Test::Darcs;
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 use Shell::Command;
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 use strict;
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 rm_rf  'temp1';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 mkpath 'temp1';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 chdir  'temp1';
# Following line added by [Allow parens to be optional when calling darcs() test command in some cases.
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312142220] 
 darcs 'init';
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 ###
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 my $test_name = 'Make sure that messages about directories call them directories.';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 mkpath 'foo.d';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 mkpath 'oof.d';
# Following line added by [Allow parens to be optional when calling darcs() test command in some cases.
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312142220] 
 darcs qw( add foo.d );
# Following line added by [Allow parens to be optional when calling darcs() test command in some cases.
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312142220] 
 darcs qw( add oof.d );
# Following line added by [fix conflict in add.pl.
# David Roundy <droundy@xxxxxxxxxxx.xxx>**20041110114416] 
 # Try adding the same directory when it's already in the repo 
# Following line added by [Test::Darcs.  darcs() instead of `$DARCS ...`
# schwern@xxxxx.xxx**20050312031120
 
 All the perl tests repeat this mantra to find darcs:
 
   use vars qw/$DARCS/;
 
   die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
   $DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
 
 And then they call $DARCS directly via a shell command.  `$DARCS ...`
 Repeated code is bad and all that shell is likely to become a compatibility
 liability.
 
 This patch creats a library Test::Darcs and in it darcs() which replaces
 `$DARCS ...`.  I've converted add.pl to use it as a demonstration.
 
 One of the issues is now in order to run an individual Perl test file you
 must add -Ilib/perl so it can find Test::Darcs.  Alternatively one can 
 add "use lib qw(lib/perl)" to all the Perl tests.  I don't know which is
 better for darcs developers.  The latter is redundant but potentially less
 confusing.
 
 More testing libraries for tests/lib/perl to follow.
 
] 
 like(darcs(qw( add foo.d )), qr/directory/,$test_name);
# Following line added by [Test::Darcs.  darcs() instead of `$DARCS ...`
# schwern@xxxxx.xxx**20050312031120
 
 All the perl tests repeat this mantra to find darcs:
 
   use vars qw/$DARCS/;
 
   die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
   $DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
 
 And then they call $DARCS directly via a shell command.  `$DARCS ...`
 Repeated code is bad and all that shell is likely to become a compatibility
 liability.
 
 This patch creats a library Test::Darcs and in it darcs() which replaces
 `$DARCS ...`.  I've converted add.pl to use it as a demonstration.
 
 One of the issues is now in order to run an individual Perl test file you
 must add -Ilib/perl so it can find Test::Darcs.  Alternatively one can 
 add "use lib qw(lib/perl)" to all the Perl tests.  I don't know which is
 better for darcs developers.  The latter is redundant but potentially less
 confusing.
 
 More testing libraries for tests/lib/perl to follow.
 
] 
 like(darcs(qw( add foo.d oof.d )), qr/directories/,$test_name);
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 ###
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 
# Following line added by [fix conflict in add.pl.
# David Roundy <droundy@xxxxxxxxxxx.xxx>**20041110114416] 
 $test_name = 'Make sure that messages about files call them files.';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 touch 'bar';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 touch 'baz';
# Following line added by [Allow parens to be optional when calling darcs() test command in some cases.
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312142220] 
 darcs qw( add bar ) ;
# Following line added by [Allow parens to be optional when calling darcs() test command in some cases.
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312142220] 
 darcs qw( add baz ) ;
# Following line added by [Test::Darcs.  darcs() instead of `$DARCS ...`
# schwern@xxxxx.xxx**20050312031120
 
 All the perl tests repeat this mantra to find darcs:
 
   use vars qw/$DARCS/;
 
   die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
   $DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
 
 And then they call $DARCS directly via a shell command.  `$DARCS ...`
 Repeated code is bad and all that shell is likely to become a compatibility
 liability.
 
 This patch creats a library Test::Darcs and in it darcs() which replaces
 `$DARCS ...`.  I've converted add.pl to use it as a demonstration.
 
 One of the issues is now in order to run an individual Perl test file you
 must add -Ilib/perl so it can find Test::Darcs.  Alternatively one can 
 add "use lib qw(lib/perl)" to all the Perl tests.  I don't know which is
 better for darcs developers.  The latter is redundant but potentially less
 confusing.
 
 More testing libraries for tests/lib/perl to follow.
 
] 
 like(darcs(qw( add bar )), qr/following file is/, $test_name);
# Following line added by [Test::Darcs.  darcs() instead of `$DARCS ...`
# schwern@xxxxx.xxx**20050312031120
 
 All the perl tests repeat this mantra to find darcs:
 
   use vars qw/$DARCS/;
 
   die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
   $DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
 
 And then they call $DARCS directly via a shell command.  `$DARCS ...`
 Repeated code is bad and all that shell is likely to become a compatibility
 liability.
 
 This patch creats a library Test::Darcs and in it darcs() which replaces
 `$DARCS ...`.  I've converted add.pl to use it as a demonstration.
 
 One of the issues is now in order to run an individual Perl test file you
 must add -Ilib/perl so it can find Test::Darcs.  Alternatively one can 
 add "use lib qw(lib/perl)" to all the Perl tests.  I don't know which is
 better for darcs developers.  The latter is redundant but potentially less
 confusing.
 
 More testing libraries for tests/lib/perl to follow.
 
] 
 like(darcs(qw( add bar baz )), qr/following files are/, $test_name);
# Following line added by [fix conflict in add.pl.
# David Roundy <droundy@xxxxxxxxxxx.xxx>**20041110114416] 
 
# Following line added by [fix conflict in add.pl.
# David Roundy <droundy@xxxxxxxxxxx.xxx>**20041110114416] 
 ###
# Following line added by [fix conflict in add.pl.
# David Roundy <droundy@xxxxxxxxxxx.xxx>**20041110114416] 
 
# Following line added by [fix conflict in add.pl.
# David Roundy <droundy@xxxxxxxxxxx.xxx>**20041110114416] 
 $test_name = 'Make sure that messages about both files and directories say so.';
# Following line added by [Test::Darcs.  darcs() instead of `$DARCS ...`
# schwern@xxxxx.xxx**20050312031120
 
 All the perl tests repeat this mantra to find darcs:
 
   use vars qw/$DARCS/;
 
   die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
   $DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
 
 And then they call $DARCS directly via a shell command.  `$DARCS ...`
 Repeated code is bad and all that shell is likely to become a compatibility
 liability.
 
 This patch creats a library Test::Darcs and in it darcs() which replaces
 `$DARCS ...`.  I've converted add.pl to use it as a demonstration.
 
 One of the issues is now in order to run an individual Perl test file you
 must add -Ilib/perl so it can find Test::Darcs.  Alternatively one can 
 add "use lib qw(lib/perl)" to all the Perl tests.  I don't know which is
 better for darcs developers.  The latter is redundant but potentially less
 confusing.
 
 More testing libraries for tests/lib/perl to follow.
 
] 
 like(darcs(qw( add bar foo.d )), qr/files and directories/, $test_name);
# Following line added by [fix conflict in add.pl.
# David Roundy <droundy@xxxxxxxxxxx.xxx>**20041110114416] 
 
# Following line added by [fix conflict in add.pl.
# David Roundy <droundy@xxxxxxxxxxx.xxx>**20041110114416] 
 ###
# Following line added by [fix conflict in add.pl.
# David Roundy <droundy@xxxxxxxxxxx.xxx>**20041110114416] 
 
# Following line added by [automatically add parent directories for darcs add
# Benedikt Schmidt <beschmi@xxxxxxx.xx>**20050205014603
 
 Instead of complaining that the parent directory of the file isn't
 in the repo, add parent directories recursively. (See Bug #20)
] 
 $test_name = 'Make sure that parent directories are added for files.';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 mkpath 'a.d/aa.d/aaa.d';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 mkpath 'b.d/bb.d';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 touch 'a.d/aa.d/aaa.d/baz';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 touch 'a.d/aa.d/aaa.d/bar';
# Following line added by [Test::Darcs.  darcs() instead of `$DARCS ...`
# schwern@xxxxx.xxx**20050312031120
 
 All the perl tests repeat this mantra to find darcs:
 
   use vars qw/$DARCS/;
 
   die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
   $DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
 
 And then they call $DARCS directly via a shell command.  `$DARCS ...`
 Repeated code is bad and all that shell is likely to become a compatibility
 liability.
 
 This patch creats a library Test::Darcs and in it darcs() which replaces
 `$DARCS ...`.  I've converted add.pl to use it as a demonstration.
 
 One of the issues is now in order to run an individual Perl test file you
 must add -Ilib/perl so it can find Test::Darcs.  Alternatively one can 
 add "use lib qw(lib/perl)" to all the Perl tests.  I don't know which is
 better for darcs developers.  The latter is redundant but potentially less
 confusing.
 
 More testing libraries for tests/lib/perl to follow.
 
] 
 like(darcs(qw( add a.d/aa.d/aaa.d/bar a.d/aa.d/aaa.d/baz b.d/bb.d )), qr/^$/, $test_name);
# Following line added by [automatically add parent directories for darcs add
# Benedikt Schmidt <beschmi@xxxxxxx.xx>**20050205014603
 
 Instead of complaining that the parent directory of the file isn't
 in the repo, add parent directories recursively. (See Bug #20)
] 
 ###
# Following line added by [automatically add parent directories for darcs add
# Benedikt Schmidt <beschmi@xxxxxxx.xx>**20050205014603
 
 Instead of complaining that the parent directory of the file isn't
 in the repo, add parent directories recursively. (See Bug #20)
] 
 
# Following line added by [improvements for darcs add and adding parent directories
# Benedikt Schmidt <beschmi@xxxxxxx.xx>**20050206000516
 Don't check for parents of recursively added files and
 order files given on commandline. Add test for new
 behaviour.
] 
 $test_name = 'Make sure that darcs doesn\'t complains about duplicate adds when adding parent dirs.';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 mkpath 'c.d/';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 touch 'c.d/baz';
# Following line added by [Test::Darcs.  darcs() instead of `$DARCS ...`
# schwern@xxxxx.xxx**20050312031120
 
 All the perl tests repeat this mantra to find darcs:
 
   use vars qw/$DARCS/;
 
   die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
   $DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
 
 And then they call $DARCS directly via a shell command.  `$DARCS ...`
 Repeated code is bad and all that shell is likely to become a compatibility
 liability.
 
 This patch creats a library Test::Darcs and in it darcs() which replaces
 `$DARCS ...`.  I've converted add.pl to use it as a demonstration.
 
 One of the issues is now in order to run an individual Perl test file you
 must add -Ilib/perl so it can find Test::Darcs.  Alternatively one can 
 add "use lib qw(lib/perl)" to all the Perl tests.  I don't know which is
 better for darcs developers.  The latter is redundant but potentially less
 confusing.
 
 More testing libraries for tests/lib/perl to follow.
 
] 
 like(darcs(qw( add c.d/baz c.d )), qr/^$/, $test_name);
# Following line added by [improvements for darcs add and adding parent directories
# Benedikt Schmidt <beschmi@xxxxxxx.xx>**20050206000516
 Don't check for parents of recursively added files and
 order files given on commandline. Add test for new
 behaviour.
] 
 ###
# Following line added by [improvements for darcs add and adding parent directories
# Benedikt Schmidt <beschmi@xxxxxxx.xx>**20050206000516
 Don't check for parents of recursively added files and
 order files given on commandline. Add test for new
 behaviour.
] 
 
# Following line added by [Fix RT#266. Introduce is_symlink instead of isnt_symlink.
# Tomasz Zielonka <tomasz.zielonka@xxxxx.xxx>**20050317121210] 
 {
# Following line added by [a TODO test which confirms that RT#266 is a regression
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312220846
 
 I suspect of the recent symlink patches introduced this. 
 Search 'darcs changes' for 'sym' to find it. 
] 
     my $test_name = 'adding a non-existent dir and file gives the expected message';
# Following line added by [a TODO test which confirms that RT#266 is a regression
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312220846
 
 I suspect of the recent symlink patches introduced this. 
 Search 'darcs changes' for 'sym' to find it. 
] 
     my $out = darcs(qw!add notadir/notafile!);
# Following line added by [a TODO test which confirms that RT#266 is a regression
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312220846
 
 I suspect of the recent symlink patches introduced this. 
 Search 'darcs changes' for 'sym' to find it. 
] 
     like($out,qr/does not exist/i,$test_name);
# Following line added by [a TODO test which confirms that RT#266 is a regression
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312220846
 
 I suspect of the recent symlink patches introduced this. 
 Search 'darcs changes' for 'sym' to find it. 
] 
 }
# Following line added by [a TODO test which confirms that RT#266 is a regression
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20050312220846
 
 I suspect of the recent symlink patches introduced this. 
 Search 'darcs changes' for 'sym' to find it. 
] 
 
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 
# Following line added by [Condense "file already in repo" output when adding. Add related tests.
# Jim Marshall <jmarshall99@xxxxx.xxx>**20041108075251
 This is meant to address issue #15 on bugs.darcs.net. Because I couldn't
 figure out a way to find already-added files "up front" (because they may only
 become duplicates after the add has started), and to avoid having to pass a []
 to addp to accumulate the list of duplicates, I moved the real work of addp
 into a where-scoped helper function. If you'd rather live with passing in the
 [], and are otherwise happy with the patch, let me know and I'll change it.
 
 This should also pass the add.pl test, and this patch extends that test a bit.
] 
 chdir '../';
# Following line added by [Shell::Command to replace shell calls in perl tests
# schwern@xxxxx.xxx**20050312033530
 
 The perl tests make shell calls for trivial things which can be done
 just fine in Perl like touch, mkdir, rm -rf.  These are compatibility
 problems waiting to happen.
 
 There is an existing module which provides Perl functions similar to common
 shell commands, Shell::Command.  It is a wrapper around the core module
 ExtUtils::Command.  I've provided a copy here so darcs users do not have to
 download and install it to run the tests.
 
 This patch converts add.pl to use Shell::Command eliminating all `` calls
 in that test as a demonstration.
] 
 rm_rf 'temp1';
# Following line added by [a test for adding directories
# Mark Stosberg <mark@xxxxxxxxxxx.xxx>**20041022172931
 I added a (failing) test for adding a new directory. The bug is simply in the
 diagnostic message returned. The directory is referred to a file when it
 should be referred to as a directory to be less confusing.
 
 Here's what the failing test output looks like now:
 
 not ok 1 - Make sure that messages about directories call them directories.
 #     Failed test (add.pl at line 20)
 #                   'A file named foo.d is already in the repository!
 # Note that to ensure portability we don't allow files that differ
 # only in case.
 # '
 #     doesn't match '(?-xism:directory)'
 
 
 
 
 
] 
 ok((!-d 'temp1'), 'temp1 directory was deleted');
 

--G4iJoqBmSsgzjUCe
Content-Type: application/x-perl
Content-Description: add.pl
Content-Disposition: attachment; filename="add.pl"
Content-Transfer-Encoding: quoted-printable

#!/usr/bin/env perl=0A=0A# Some tests for 'darcs add'=0A=0Ause lib qw(lib/p=
erl);=0A=0Ause Test::More qw/no_plan/;=0A=0Ause Test::Darcs;=0Ause Shell::C=
ommand;=0A=0Ause strict;=0A=0Arm_rf  'temp1';=0Amkpath 'temp1';=0Achdir  't=
emp1';=0Adarcs 'init';=0A=0A###=0A=0Amy $test_name =3D 'Make sure that mess=
ages about directories call them directories.';=0Amkpath 'foo.d';=0Amkpath =
'oof.d';=0Adarcs qw( add foo.d );=0Adarcs qw( add oof.d );=0A# Try adding t=
he same directory when it's already in the repo =0Alike(darcs(qw( add foo.d=
 )), qr/directory/,$test_name);=0Alike(darcs(qw( add foo.d oof.d )), qr/dir=
ectories/,$test_name);=0A=0A###=0A=0A$test_name =3D 'Make sure that message=
s about files call them files.';=0Atouch 'bar';=0Atouch 'baz';=0Adarcs qw( =
add bar ) ;=0Adarcs qw( add baz ) ;=0Alike(darcs(qw( add bar )), qr/followi=
ng file is/, $test_name);=0Alike(darcs(qw( add bar baz )), qr/following fil=
es are/, $test_name);=0A=0A###=0A=0A$test_name =3D 'Make sure that messages=
 about both files and directories say so.';=0Alike(darcs(qw( add bar foo.d =
)), qr/files and directories/, $test_name);=0A=0A###=0A=0A$test_name =3D 'M=
ake sure that parent directories are added for files.';=0Amkpath 'a.d/aa.d/=
aaa.d';=0Amkpath 'b.d/bb.d';=0Atouch 'a.d/aa.d/aaa.d/baz';=0Atouch 'a.d/aa.=
d/aaa.d/bar';=0Alike(darcs(qw( add a.d/aa.d/aaa.d/bar a.d/aa.d/aaa.d/baz b.=
d/bb.d )), qr/^$/, $test_name);=0A###=0A=0A$test_name =3D 'Make sure that d=
arcs doesn\'t complains about duplicate adds when adding parent dirs.';=0Am=
kpath 'c.d/';=0Atouch 'c.d/baz';=0Alike(darcs(qw( add c.d/baz c.d )), qr/^$=
/, $test_name);=0A###=0A=0A{=0A    my $test_name =3D 'adding a non-existent=
 dir and file gives the expected message';=0A    my $out =3D darcs(qw!add n=
otadir/notafile!);=0A    like($out,qr/does not exist/i,$test_name);=0A}=0A=
=0A=0Achdir '../';=0Arm_rf 'temp1';=0Aok((!-d 'temp1'), 'temp1 directory wa=
s deleted');=0A
--G4iJoqBmSsgzjUCe--
There's stuff above here

Generated at 02:00 on 03 May 2005 by mariachi 0.52