[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Updating two WCs simultaneously runs the client-side hooks on both repositories.

From: Tim Sweet <tim.sweet_at_sncorp.com>
Date: Wed, 2 Aug 2017 10:49:57 -0700 (PDT)

There appears to be a bug in which a client-side hook set on repo 1 can be (incorrectly) run on repo 2.

Expected behavior:
Hooks for repo1 are only run on repo1, not repo2, when both are updated at the same time.

Actual behavior:
Hooks for one repo are run on both if they are updated together.

Steps to reproduce:
0. Install version 1.9.6, build 27867. I'm on Windows 10 Pro, build 15063.483.

1. Checkout two working copies, for example C:\repo1 and C:\repo2 (these should be different repositories, otherwise the hooks are obviously the same).

2. Setup and commit a post-update client-side hook on repo1, do not set any hooks on repo2. I've attached an example python script which prints the parameters to C:\repo1\params.txt, use this or your own equivalent file.

3. In Windows explorer, ctrl+click both C:\repo1 and C:\repo2 (both WCs are now selected)

4. Right click on either selected item and click "SVN Update". It is helpful if you have it prompt you for permission to run the hook each time, so that you can see that it prompts twice, and check the params.txt between executions.

5. Observe that line 6 in C:\repo1\params.txt will be the path to repo1 after the first prompt to run the hook, and the path to repo2 on the second prompt (even though the hook only exists on repo1).

6. You can verify the expected behavior by just updating repo2, and observe that the hook is not run.

Attached is my example python script to print the paths. To set it as the post-update hook, set the tsvn:postupdatehook property to run the following command (update the path to python as needed):

C:/Python27/python.exe C:/printparams.py

I selected the "wait for the script to finish" and "always execute the script" checkboxes. If you checked your working copy out to somewhere other than "repo1" you'll need to modify this file to output params.txt to a valid path.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2017-08-02 22:59:24 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.