On Sat, Mar 31, 2007 at 04:25:40PM +0300, Eddy Petri??or wrote: > Mike McCallister wrote: > > The same files are excluded from the built .tar.gz file if they are > > not listed in the svn:ignore property, which is the behavior I would > > expect. This is a suitable workaround for now, although it makes my > > svn status output cluttered and unpleasant to look at. > > I think that all this dance of hardlinks, cp -a, making lists and all that > tends > to be a "perfect" solution... and perfect is the opposite of good. > > I propose to just use svn export instead of all this... > > The only disadvantages I see are: > - - more disk space is used for the build > - - if the source is changed during the build, that won't be visible at the > end of > the build, thus preventing from an early stage the detection of weird build > systems/autochanging files ...
One other major disadvantage I would add to this list is the difference in speed. Especially when working on large projects (lots of files or large files) and/or when using a working copy on a slow (e.g., networked) filesystem. Hardlinks are very fast compared with creating a complete copy of the files using "svn export". I agree that correctness is more important than performance, but I'd like both, if possible. > Another option would be to use "svn status --verbose" whose output would need > to > be parsed to fetch only the first and last comlumns. This command will list > all > files under svn control plus the ones that are not (ignored files are not > listed). After consulting the source, it looks like svn-buildpackage is already getting it mostly right. It uses the perl wrapper for libsvn (the C API to subversion) and it invokes the status() function that appears to give as much detail as "svn status --verbose". The bug appears to be that it doesn't properly handle all the possible statuses in the "correct" way. Line 364 in my copy of /usr/bin/svn-buildpackage reads as follows: next if ($tmp{$_} eq 2 || $tmp{$_} eq 5); # skip junk and deleted files Reference to the possible statuses can be found here: http://svn.collab.net/svn-doxygen/group__svn__wc__status.html#gga11a83 This code has the effect of excluding files in status 2 (svn_wc_status_unversioned) and 5 (svn_wc_status_missing) from the list of files/directories to copy into the build target. However, it includes files in status 11 (svn_wc_status_ignored), which seems to be the bug I filed. When I change the code to read as follows, svn-buildpackage behaves as I want and excludes files from the svn:ignore list in the built .tar.gz. next if ($tmp{$_} eq 2 || $tmp{$_} eq 5 || $tmp{$_} eq 11); # skip junk and deleted files So you can consider this a patch, but I recommend that someone who understands the logic here and the behavior of libsvn a little better to review the list of possible statuses because there are some other statuses (e.g., svn_wc_status_deleted=6) that might result in unintended files being included in the build. Hope this helps. Mike McCallister -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]