Doesn't address the problem you're describing exactly, but you might want
to consider some kind of templating solution in a script over SVN hooks.
(Think build scripts like rake or psake or whatever else you want, not to
say something like bash or PowerShell couldn't work, though.) The scripts
would use some system specific file (machine name, username, something like
that in the file name plus defaults) to determine what values to inject
into the template. Then you would check the template in and put an ignore
on the actual file, requiring users to generate it by running the script.
The biggest pay-off is that this doesn't become specific to
*one*particular system; if any other system ever has specific needs,
you just
add another system specific file. Not to mention that users can change
things locally without having to worry about accidentally committing their
changes. It's also great for when you start using a build server, and you
check it all in SVN and version it as part of your project. And just
running the script isn't a big burden on users; I do it on pretty much
every project where I work.
On Mon, Aug 19, 2013 at 9:12 PM, Peter Koves <kovesp_at_sympatico.ca> wrote:
> Perhaps I'm confused, but I expected the file passed as the PATH argument
> to the post-update-hook (and also the post-commit-hook) to contain a list
> of AFFECTED files rather than just the path(s) that the command was applied
> to. So for update, I expected the actually updated files to be in the list.
>
> Is the only way to find out what was updated or committed to have a 'pre-'
> hook, apply 'svn st -v' to the set of paths supplied, save the output in
> some well known location, then repeat in the 'post-' hook and derive the
> set of changes by comparing revision numbers? And, this doesn't even work
> for commit ... I could fake it with trying to do 'svn st -u' ... but the
> commit may be selectively stopped from the dialog.
> In any case, seems pretty inefficient and complicated when you actually
> have the information on hand ...
>
> My actual application is this: I have tree which contains (among other
> things) some XML files. These files need to have an XML processing
> instruction changed on a particular system, so I'd like to do that whenever
> any file is updated. Then the PI has to be changed back before the file is
> committed.
>
> ------------------------------------------------------
>
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3063012
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe_at_tortoisesvn.tigris.org].
>
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3063022
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-08-20 08:19:42 CEST