<commit_before>= Configuring SVN on Windows =
This is a guide on setting up SVN for developers running Windows.

[[TOC(inline)]]


== Prerequisites ==
In order to access the SVN repository you must have a ssh account on `seattle.cs.washington.edu`. To gain access email seattle-devel@cs.

You will need the following programs over the course of this guide:

[http://sourceforge.net/projects/win32svn/files/1.6.17/Setup-Subversion-1.6.17.msi/download win32svn installer][[BR]]
[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html puttygen and plink][[BR]]
[http://winscp.net/eng/download.php WinSCP][[BR]]

== Get SVN ==
Download the `win32svn` installer from [http://sourceforge.net/projects/win32svn/files/1.6.17/Setup-Subversion-1.6.17.msi/download]

Install it.

=== Configure icon paths ===
The environment variable for the icons is not set by default.

The easiest way to configure it is to simply save the following code as iconv.bat file, and run it.

{{{
SET APR_ICONV_PATH = C:\Program Files\Subversion\iconv
}}}

=== Test Environment variables ===
Now that we've installed svn, we should test that it was installed correctly.

Open up a command prompt (see this [http://www.youtube.com/watch?v=qrQMLOykSH4 video] for details), and type `svn --version`, and hit the `enter` key. The output should be similar to the following:
{{{
C:\Users\User>svn --version

svn, version 1.6.17 (r1128011)

   compiled Jun  2 2011, 23:35:08


Copyright (C) 2000-2009 CollabNet.

Subversion is open source software, see http://subversion.apache.org/

This product includes software developed by CollabNet (http://www.Collab.Net/).
}}}

The next thing to test is that the path to the iconv folder was set correctly. To do that, type `echo %APR_ICONV_PATH%` into the command prompt, and hit `enter`. The output should be similar to the following:
{{{
C:\Users\User> echo %APR_ICONV_PATH%
C:\Program Files\Subversion\iconv
}}}

== Set up SSH keys ==

=== Generate the keys ===
The first step in using SSH keys is to generate the keys. If you've used SSH keys before, you can skip this step.

The easiest way to generate keys on Windows is with `puttygen`. You can download it [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html here].

<Generate key pic>
First, click on `Generate`, and move the mouse around, until enough randomness was generated.

In the upper portion of the window there is a text field labeled `Public key for pasting into OpenSSH authorized_keys file:`. Right click, and select `Select All`, and then right click again and select `Copy`. The content of this text field is '''different''' from what you would get with the `Save public key` button. Do not try to copy this generated public key. ''It won’t work''.

Paste that text into a new file called `authorized_keys`.

Then, click on the `Save private key` button.

You may get a warning "Are you sure you want to save this key without a passphrase to protect it?". Click Yes.

Save the private Key as `id_rsa.ppk`.

=== Upload the keys ===
The next step is to upload your public key to the server. We will be doing this with WinSCP

Download winscp from [http://winscp.net/download/winscp435.zip here]. 

Extract the files, and run `winscp.exe`. Fill in the connection details with the server, your username, and your password:
< winscp connect dialog>

You may get a warning that the host certificate was not in the cache. Click `Yes`.
<winscp warning dialog>

You'll then see something like this:
<winscp main dialog>

Create a new folder on the server called `.ssh`.
<new folder dialog>

Click and drag the `authorized_keys` file you made before into the `.ssh` folder.

=== Test the private key ===
You'll need `plink`, a command-line interface to the PuTTY back end. You can download plink [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html here]

Open a command prompt, and run
{{{
c:\path\to\plink.exe -i c:\path\to\id_rsa.ppk <EMAIL>
}}}

If there are no errors, you'll have shell access to seattle.cs.washington.edu.

=== Configure SVN to use the private key ===
The next step is to configure SVN to use `plink` and the private key you made before.

Open `%APPDATA%\Subversion\config` with a text editor.[[BR]]
On '''XP''' `%APPDATA%` is `C:\Documents and Settings\<Username>\Application Data`[[BR]]
On '''7/Vista''' `%APPDATA%` is `C:\Users\<Username>\AppData\Roaming`[[BR]]

Add the following line to the `[tunnels]` section in the `config` file:
{{{
ssh=c:/path/to/plink.exe -i c:/path/to/id_rsa.ppk
}}}

Note that the backslashes Windows normally uses are replaced with forward slashes. In the svn config files, backslashes are escape characters. In order to put backslashes in the path, they'd each need to be escaped.
<commit_msg>Revision 6 of RepoConfigurationForWindows<commit_after>= Configuring SVN on Windows =
This is a guide on setting up SVN for developers running Windows.

[[TOC(inline)]]


== Prerequisites ==
In order to access the SVN repository you must have a ssh account on `seattle.cs.washington.edu`. To gain access email seattle-devel@cs.

You will need the following programs over the course of this guide:

[http://sourceforge.net/projects/win32svn/files/1.6.17/Setup-Subversion-1.6.17.msi/download win32svn installer][[BR]]
[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html puttygen and plink][[BR]]
[http://winscp.net/eng/download.php WinSCP][[BR]]

== Get SVN ==
Download the `win32svn` installer from [http://sourceforge.net/projects/win32svn/files/1.6.17/Setup-Subversion-1.6.17.msi/download]

Install it.

=== Configure icon paths ===
The environment variable for the icons is not set by default.

The easiest way to configure it is to simply save the following code as iconv.bat file, and run it.

{{{
SET APR_ICONV_PATH = C:\Program Files\Subversion\iconv
}}}

=== Test Environment variables ===
Now that we've installed svn, we should test that it was installed correctly.

Open up a command prompt (see this [http://www.youtube.com/watch?v=qrQMLOykSH4 video] for details), and type `svn --version`, and hit the `enter` key. The output should be similar to the following:
{{{
C:\Users\User>svn --version

svn, version 1.6.17 (r1128011)

   compiled Jun  2 2011, 23:35:08


Copyright (C) 2000-2009 CollabNet.

Subversion is open source software, see http://subversion.apache.org/

This product includes software developed by CollabNet (http://www.Collab.Net/).
}}}

The next thing to test is that the path to the iconv folder was set correctly. To do that, type `echo %APR_ICONV_PATH%` into the command prompt, and hit `enter`. The output should be similar to the following:
{{{
C:\Users\User> echo %APR_ICONV_PATH%
C:\Program Files\Subversion\iconv
}}}

== Set up SSH keys ==

=== Generate the keys ===
The first step in using SSH keys is to generate the keys. If you've used SSH keys before, you can skip this step.

The easiest way to generate keys on Windows is with `puttygen`. You can download it [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html here].

[[Image(Create key.png)]][[BR]]
Click on `Generate`, and move the mouse until enough randomness was generated.

[[Image(puttygen - add comment.png)]][[BR]]
An optional step that can be done is to fill in the `Comment` field with your email address.[[BR]]

In the upper portion of the window there is a text field labeled `Public key for pasting into OpenSSH authorized_keys file:`. Right click, and select `Select All`, and then right click again and select `Copy`. The content of this text field is '''different''' from what you would get with the `Save public key` button. If you use the file from the `Save public key` button ''It will not work''.

Paste that text into a new file called `authorized_keys`.

Then, click on the `Save private key` button.

[[Image(puttygen - no passphrase.png)]][[BR]]
You may get a warning "Are you sure you want to save this key without a passphrase to protect it?". Click Yes.

Save the private Key as `id_rsa.ppk`.

=== Upload the keys ===
The next step is to upload your public key to the server. We will be doing this with WinSCP

Download winscp from [http://winscp.net/download/winscp435.zip here]. 

Extract the files, and run `winscp.exe`. Fill in the connection details with the server, your username, and your password:[[BR]]
[[Image(winscp - connect dialog.png)]]

You may get a warning that the host certificate was not in the cache. Click `Yes`.[[BR]]
[[Image(winscp - warning dialog.png)]]

You'll then see something like this:[[BR]]
[[Image(WinSCP main dialog.png)]]

Create a new folder on the server called `.ssh`.[[BR]]
[[Image(winscp - Create Folder.png)]]

Click and drag the `authorized_keys` file you made before into the `.ssh` folder.

=== Test the private key ===
You'll need `plink`, a command-line interface to the PuTTY back end. You can download plink [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html here]

Open a command prompt, and run
{{{
c:\path\to\plink.exe -i c:\path\to\id_rsa.ppk <EMAIL>
}}}

If there are no errors, you'll have shell access to seattle.cs.washington.edu.

=== Configure SVN to use the private key ===
The next step is to configure SVN to use `plink` and the private key you made before.

Open `%APPDATA%\Subversion\config` with a text editor.[[BR]]
On '''XP''' `%APPDATA%` is `C:\Documents and Settings\<Username>\Application Data`[[BR]]
On '''7/Vista''' `%APPDATA%` is `C:\Users\<Username>\AppData\Roaming`[[BR]]

Add the following line to the `[tunnels]` section in the `config` file:
{{{
ssh=c:/path/to/plink.exe -i c:/path/to/id_rsa.ppk
}}}

Note that the backslashes Windows normally uses are replaced with forward slashes. In the svn config files, backslashes are escape characters. In order to put backslashes in the path, they'd each need to be escaped.

{'fraction_non_alphanumeric': 0.11102049138546233, 'fraction_numerical': 0.012131715771230503, 'mean_word_length': 4.311315646995127, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2246925', 'n_tokens_mistral': 3144, 'n_tokens_neox': 3000, 'n_words': 1297}