Discussion:
Feature request: Configure hooks for server repository path
Eugene Kotlyarov
2014-10-20 21:08:59 UTC
Permalink
Hi

Currently you have to configure hook scripts for each checked out repository copy, this is inconvenient when you checkout same repository twice, or checkout several branches.

It would be nice to configure hook scripts for server repository path instead of local path, preferably with masks e.g. when hook is set for http://repository/* it will be called for all checked out copies that have server path below http://repository

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3090212

To unsubscribe from this discussion, e-mail: [users-unsubscribe-6zjzXkf2FExf8fUKLXF2/HdfcadvtA/***@public.gmane.org].
Stefan Küng
2014-10-21 19:23:21 UTC
Permalink
Post by Eugene Kotlyarov
Hi
Currently you have to configure hook scripts for each checked out
repository copy, this is inconvenient when you checkout same
repository twice, or checkout several branches.
It would be nice to configure hook scripts for server repository path
instead of local path, preferably with masks e.g. when hook is set
for http://repository/* it will be called for all checked out copies
that have server path below http://repository
See the docs:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-propertypage.html#tsvn-dug-propertypage-tsvn-props

You can specify the path to the hook script like this:
%REPOROOT%/trunk/contrib/hook-scripts/client-side/checkyear.js

Instead of %REPOROOT% you can also specify %REPOROOT+%. The + is used to
insert any number of folder paths necessary to find the script. This is
useful if you want to specify your script so that if you create a branch
the script is still found even though the url of the working copy is now
different. Using the example above, you would specify the path to the
script as %REPOROOT+%/contrib/hook-scripts/client-side/checkyear.js.

Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3090257

To unsubscribe from this discussion, e-mail: [users-unsubscribe-6zjzXkf2FExf8fUKLXF2/HdfcadvtA/***@public.gmane.org].
Eugene Kotlyarov
2014-10-24 00:07:05 UTC
Permalink
Post by Stefan Küng
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-propertypage.html#tsvn-dug-propertypage-tsvn-props
%REPOROOT%/trunk/contrib/hook-scripts/client-side/checkyear.js
Instead of %REPOROOT% you can also specify %REPOROOT+%. The + is used to
insert any number of folder paths necessary to find the script. This is
useful if you want to specify your script so that if you create a branch
the script is still found even though the url of the working copy is now
different. Using the example above, you would specify the path to the
script as %REPOROOT+%/contrib/hook-scripts/client-side/checkyear.js.
Thank you!

I'll investigate this solution.
Couple of problems with it however are
1. Since this is client side script not all users may need/want to use it.
2. Storing script in repository maybe inconvenient since it is not related to this repository project, and if there is a bug found in it, it will have to be updated in all branches where it is stored.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3090379

To unsubscribe from this discussion, e-mail: [users-unsubscribe-6zjzXkf2FExf8fUKLXF2/HdfcadvtA/***@public.gmane.org].
Loading...