Boost logo

Boost :

From: Jens Seidel (jensseidel_at_[hidden])
Date: 2008-03-22 14:39:54


On Sat, Mar 22, 2008 at 11:49:11AM -0500, Rene Rivera wrote:
> Jens Seidel wrote:
> > I checked RC2 (tar.bz2) and noticed that still many files have wrong
> > permissions:
> >
> > I told you already about this and wonder why it isn't fixed yet
> > (removing the svn:executable property of Subversion should be sufficient).
> >
> > If you need a script just ask ...
>
> OK... What does the script do?

Nothing, it doesn't exist yet. But once written it could find affacted
files with wrong permissions and fix these.

> Obviously I would prefer something that
> does the svn manipulations. I would also love it if I could run it on
> Windows so I could more easily verify with tsvn what the changes to the
> repo it's going to do.

OK, let me restrict to the simple find and svn tools which should have
counterparts on your system.

$ find -type f -iname "*.html" -exec svn propdel svn:executable "{}" \;

simple finds all files (-type f) with end with ".html" (case insensitive,
-iname "*.html") and executes "svn propdel svn:executable" on it to
delete the svn:executable property. It should be simple to replace this
with commands available for you. Otherwise I suggest you obtain Cygwin
from http://www.cygwin.com/ and install it. It will install a minimal
set of Linux tools properly packaged for Windoofs. Installation should
need only 2-5 minutes.

Let's first determine the current number of executable files:

$ find -type f -perm +111 | wc -l
2687

Puh, too many! Some of these may be valid scripts, so let's touch only
files we know about for sure. Let's fix these according to file suffix:

Affected files by name:
*.html (864), *.hpp (857), *.cpp (496), *.png (111), *.qbk (63)

Change into your trunk directory (which souldn't contain any changes)
and start ($ indicates a shell prompt, don't enter it):

$ find -type f -iname "*.html" -exec svn propdel svn:executable "{}" \;
$ find -type f -iname "*.hpp" -exec svn propdel svn:executable "{}" \;
$ find -type f -iname "*.cpp" -exec svn propdel svn:executable "{}" \;
$ find -type f -iname "*.png" -exec svn propdel svn:executable "{}" \;
$ find -type f -iname "*.qbk" -exec svn propdel svn:executable "{}" \;

Only 297 files left :-)

Now let's commit after inspecting that "svn status" only reports changes
to properties:
$ svn ci -m'Removed svn:executable flag from *.html, *.hpp, *.cpp, *.png, *.qbk files'

I think all remaining files should be touched later (such as *.rst,
*.pdf, ...). The stuff should not need a long time and cleans many broken
permissions!

PS: The Subversion config file (on Unix: ~/.subversion/config contains a
section [auto-props] which can ensure proper mime types and executable
flags based on file name). Once properly set there should be not again
such a situation. Also inspecting new files bevore an initial commit
helps to ensure a proper state.

Jens


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk