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

Re: Small tool to make Tortoise auto-connect to VPN

From: Andy Levy <andy.levy_at_gmail.com>
Date: Wed, 7 Jul 2010 11:24:42 -0400

On Wed, Jul 7, 2010 at 10:53, Simon Large
<simon.tortoisesvn_at_googlemail.com> wrote:
> On 7 July 2010 14:39, Leo Davidson <leonudeldavidson_at_gmail.com> wrote:
>> Hi everyone,
>>
>> Just want to share a small thing I made for people using Tortoise SVN
>> (and similar tools) over VPNs (virtual private networks). (It'll also
>> help with RAS dial-ups, I think.)
>>
>> It's just a command-line exe that checks if a VPN is connected and, if
>> not, tells Windows to connect to it and waits for that to finish.
>>
>> If you access SVN over a VPN it can be a pain to manually connect
>> first (especially if the VPN disconnects due to inactivity and you're
>> never sure if it's still connected).
>>
>> I couldn't find a good one existing solution so I wrote my own. (I
>> found was RasDial.exe but that prompts via the command-line and asks
>> for the VPN password even if you're already connected.)
>>
>> After testing (on Windows 7 x64, FWIW) for a few weeks it seems to
>> work well. The binary and C++ source are here:
>>
>> http://www.pretentiousname.com/miscsoft/index.html#ConnectVPN
>>
>> To use it with Tortoise SVN, first create a .bat file that runs the
>> tool with the name of your VPN (the connection name in the network
>> control panel). Then tell Tortoise to run the .bat file as part of its
>> pre_commit_hook and pre_update_hook. (Set both to wait=true and
>> show/hide=hide.)
>>
>> (A .bat file is used because AFAIK you can't specify arbitrary
>> command-line arguments for hooks in the Tortoise SVN.)
>>
>> When you commit or update:
>>
>> - If you're not on the VPN, you'll see the standard Windows VPN/RAS
>> connection user interface (password prompt, progress windows, etc.).
>> Once connected the commit/update will continue as normal.
>>
>> - If you're already connected then nothing extra will happen and
>> you'll commit/update as normal.
>>
>> Limitation:
>>
>> - AFAIK, Tortoise SVN only has hooks for commit and update so there's
>> no way to run the tool before other events (e.g. log or blame). I've
>> not found that to be a big deal but it'll depend how you typically use
>> SVN.
>>
>> It's a very simple tool but I hope other people find it useful.
>
> Silly question, but why would you need a VPN to get TortoiseSVN to
> work? You're not using file:// access are you?

I can only access my repositories when I'm outside the office if I
connect via VPN - our server isn't publicly accessible.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-07-07 17:25:13 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.