Hi Eddy, On Fri, Nov 28, 2008 at 06:49:46PM +0200, Eddy Petrișor wrote: > OTOH, if failing can be avoided (svn add --no-ignore everything except > .svn dirs), I think that is preferable. > > So, since using "svn add --no-ignore" would yeld the same results for > interactive for as for noninteractive builds and avoids creating a prompt, > I think that we should investigate into that option.
Okay, I figured out something different, patch is attached. It's now simply printing a note about files being ignored and tries to add them via the SVN::Client connection. What would you say? > > Off topic: Why is that line > > return 1 if ($SDCommon::opt_ignoreerrors); > > in sub withechoNoPrompt? As far as I can see (and debug) that means that > > no command is executed when noninteractive and ignoreerrors are set. It > > just returns 1. That pretty much looks like a bug, doesn't it? (I'm > > becoming more cautious) > > No, it makes noninteractive builds not fail on errors which otherwise would > have > stopped the build when --svn-ignoreerrors is passed. I see the idea but I don't see the command being executed in that case. See the lines around it: ,---- | print STDERR "$cmd\n" if(!$SDCommon::opt_quiet); | return 1 if ($SDCommon::opt_ignoreerrors); | return (!system(@_)); `---- the actual system call wouldn't be executed with ignoreerrors set, or am I missing something here? Hauke PS: Sorry for not commiting the other thing; I was not at home this weekend. Thanks for doing that!
Index: SDCommon.pm
===================================================================
--- SDCommon.pm (revision 11906)
+++ SDCommon.pm (working copy)
@@ -575,20 +575,19 @@
%tmp=();
$statusref=\%tmp;
$ctx->status("", "BASE", \&collect_name, 1, 1, 0, 1);
+ my $ignorewarn = 0;
for(keys %tmp) {
if($tmp{$_} == 2) {
$ctx->add($_, 1);
- } elsif($tmp{$_} == 11) { # subversion ignores some files, like .swp from vim; see #504233 for details
- print STDERR "One or more files are ignore due to global subversion ignore patterns,\n\tquit the process here? [y/n?]: ";
- prompt:
- my $ans = <STDIN>;
- if($ans !~ /^[yn]/i) {
- print STDERR "The choices are:\n\tYes (y) which means aborting, or No (n) which means to NOT include those files.\n";
- goto prompt;
- }
- if($ans =~ /^y$/i) {
- exwerror("Aborting.\n");
- }
+ } elsif($tmp{$_} == 11) {
+ print STDERR <<EOLWARN
+Note: One or more files are being ignored due to global subversion
+ignore patterns! You should consider changing you svn config.
+svn-buildpackage tries to add those files now, though.
+EOLWARN
+ unless $ignorewarn > 0
+ $ignorewarn = 1;
+ $ctx->add($_, 1);
}
}
chdir $curdir;
signature.asc
Description: Digital signature

