2008/11/25 Jan Hauke Rahm <[EMAIL PROTECTED]>: > On Tue, Nov 25, 2008 at 03:38:52PM +0200, Eddy Petrișor wrote: >> This is not OK, since it breaks noninteractive builders. It should use >> some form of withEcho or something simillar in order to take into >> account the noninteractive option. > > True, my stupid mistake. Unfortunately withecho doesn't fit here. I'll > have another look at it to figure something out.
As I said before, I think you should add a prompt function that chooses the default option for non-interactive builds and chooses to ignore any errors if --svn-ignore is present. Which reminds me, --svn-ignore is used to choose the "ignore errors" option in a withEcho prompt, when --svn-noninteractive is used/set. By default, the default option (I think is always Quit) is chosen in noninteractive builds. >> This should be a warning, not a fatal error, thus... > > Well, I think user should have the chance to abort the process here (to > not upgrade with source that's missing files), so a question seems > reasonable for; don't you think? Yes, but there should be support for non-interactive builds, too. 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. I don't know, I am confused now about the best course of action... :-/ >> the default should be to go on with the ignored pattern, not to quit. > > Actually there is no default at all. At the moment you have to press y/Y > or n/N, otherwise it will "retry". The question is (as above) if asking > the user is more appropriate than just warning him/her. Not having a default is a bug, as I said, since it breaks noninteractive builds. >> Another solution would be to simply use "svn add --no-igore" with all >> the files found in the filesystem. > > Hmm... I have to reread the code again... Why is that SVN::Client stuff > in there and not just your suggested "svn add"? I can't see any > advantage at the moment. Reuses the connection to the server and should be what we use from now on ( >=0.7 ) in svn-bp. If that doesn't cut it, there is another perl module, I think is called SVN::Ra, which should be used instead. > 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. There are several cases when such a behaviour is preferred. -- Regards, EddyP ============================================= "Imagination is more important than knowledge" A.Einstein

