Showing posts with label Subversion. Show all posts
Showing posts with label Subversion. Show all posts

Wednesday, August 21, 2013

Set Paths for TortoiseSVN Icon Overlays

TortoiseSVN icon overlays can be quite a resource hog if it is used in all your Windows drives and directories (which is the default). You can optimize it by specifying the drives or directories that need the overlays (e.g. your development directory that is using SVN), by using the method below:

Right click anywhere in Windows Explorer > TortoiseSVN > Settings > Look and Feel > Icon Overlays >

  • Drive Types: Only tick on drives that have SVN files.
  • Exclude paths: Set paths that do not have SVN files (separated by new line). E.g.:
  • C:\*
    E:\*
  • Include paths: Set paths that have SVN files (separated by new line). E.g.:
  • D:\*
  • Click OK.

If you find this post helpful, would you buy me a coffee?


Sunday, October 2, 2011

Subversion: Post-Commit Email Notification

A Subversion repository has a post-commit "hook" which is invoked on every SVN commit. This can be used to send email notifications to all team members involved.

The following is my two-script method inspired by Andrew Farley's SVN Post-Commit Automatic Email.
With this method, we can set different emails for each repositories, and we only have to keep the main script in one place for easy maintenance.

This script is easy to configure and highly customizable. As a batch script, it can be used by Subversion on Windows.
Blat is required for sending email. You only need to change the values in the "Begin/End Settings" section. Please refer the script header remarks for more information and other options.

How to use:

1. Create a batch file named as "weizh-post-commit-email.bat" with the following contents:

ECHO OFF

REM =====================================================================================
REM Copyright 2011 Weizh Chang
REM 
REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with this program.  If not, see <http://www.gnu.org/licenses/>.
REM
REM
REM This script is inspired by 'SVN Post-Commit Automatic Email' by Andrew Farley
REM (andrewfarley.com/sysadmin/svn-commit-automatic-email).
REM =====================================================================================

REM =====================================================================================
REM Program    : Weizh SVN Post-Commit Email Batch Script
REM File       : weizh-post-commit-email.bat
REM Version    : 1.0.0.0
REM URL        : simpcode.blogspot.com
REM Description:
REM
REM Please change the settings in the Begin/End Settings section below.
REM
REM This script requires:
REM - post-commit.bat (the caller).
REM - blat emailer tool (www.blat.net).
REM - usermap (optional - see below).
REM
REM Features:
REM - Sends SVN post commit email notification.
REM - Allows multiple common email recipients for all repositories.
REM - Allows multiple custom email recipients for each repository.
REM - Option to include the SVN Diff in the email.
REM - Option to skip sending email using the 'no email' tag in the log.
REM - Option to use usermap (see below).
REM
REM
REM usermap:
REM This script is able to read the authorized svn users from conf\authz, and map to
REM the users' emails in a 'usermap' file. These emails will be used as part of 
REM the receiver emails. This feature can be disabled by changing the 
REM Settings' usermap to empty.
REM
REM The following example shows how a 'usermap' file content may look like:
REM
REM harry=name=Harry Smith
REM harry=email=harry@example.com
REM
REM sally=name=Sally Anderson
REM sally=email=sally@example.com,sally@example2.com
REM =====================================================================================

ECHO ON

SET repos=%1
SET rev=%2
SET reposName=%3
SET sendTo=%4
SET sendToCc=%5


REM ================ Begin Settings ====================

REM ==== Set email settings
SET emailServer=mail.example.com
SET emailPort=25
SET emailUid=admin@example.com
SET emailPwd=adminPassw0rd
SET sendFrom=admin@example.com
SET sendTry=5

REM ==== Set common receiver/cc email (comma separated, without quotes and spaces)
SET sendToCommon=
SET sendToCcCommon=michelle@example.com,alex@example.com

REM ==== Set the blat exe directory
SET emailDir=C:\blat\

REM ==== Set the SVN bin directory
SET svnDir=C:\svnserve\bin\

REM ==== Set the SVN Diff line limit (-1 to not show any)
SET limitDiff=-1

REM ==== Set the usermap file location (leave empty if not using usermap)
SET usermap=D:\svn_repos\scripts\usermap

REM ==== Set no email tag. If this tag exists at the beginning of a line in the log,
REM ==== no email will be sent (leave empty if not using this feature)
SET noEmailTag=[noemail]

REM ================ End Settings ======================


REM ==== Remove surrounding quotes
SET repos=%repos:"=%
SET rev=%rev:"=%
SET reposName=%reposName:"=%
SET sendTo=%sendTo:"=%
SET sendToCc=%sendToCc:"=%

REM ==== Set reposName to repos if empty
IF "%reposName%"=="" SET reposName=%repos%

REM ==== Get svn author
FOR /F "tokens=*" %%R IN ('"%svnDir%svnlook.exe" author -r %rev% %repos%') DO SET author=%%R
SET authorName=

REM ==== Set email temp file
SET tmpFile=%~dp0svn-email-%rev%-%RANDOM%.tmp


REM ================ Begin Read Usermap ================

REM ==== Skip if usermap not exist
IF "%usermap%"=="" GOTO SendEmail
IF NOT EXIST %usermap% GOTO SendEmail

SETLOCAL ENABLEDELAYEDEXPANSION

REM ==== Set authz file
SET reposAuthz=%repos:/=\%\conf\authz

SET sendToMap=
SET authorName=

FOR /F "tokens=1,2,3 delims==" %%A IN (%usermap%) DO (
    IF NOT "%%%A:~0,1%"=="#" (
        IF "%%B"=="email" (
            IF NOT "%%C"=="" (
                SET count=0
                REM ==== If user exists in authz, append the emails to sendToMap
                FOR /F "tokens=1 delims==" %%U IN ('FINDSTR /I /B "%%A.*\=.*r" %reposAuthz%') DO (
                    REM ==== Remove any spaces
                    FOR /F "tokens=1 delims= " %%Y IN ("%%U") DO (
                        IF "%%Y"=="%%A" (
                            IF !count!==0 (
                                IF NOT "!sendToMap!"=="" SET sendToMap=!sendToMap!,
                                SET sendToMap=!sendToMap!%%C
                                SET count=1
                            )
                        )
                    )
                )
            )
        ) ELSE (
            IF "%%B"=="name" (
                IF "%%A"=="%author%" SET authorName=%%C
            )
        )
    )
)

SET mapReturns=^
  SET sendToMap=%sendToMap%^&^
  SET authorName=%authorName%

ENDLOCAL & %mapReturns%

REM ==== Append to the existing sendTo
IF NOT "%sendToMap%"=="" (
    IF NOT "%sendTo%"=="" SET sendTo=%sendTo%,
)
SET sendTo=%sendTo%%sendToMap%

REM ================ End Read Usermap ==================


:SendEmail

REM ==== Append any common emails
IF NOT "%sendToCommon%"=="" (
    IF NOT "%sendTo%"=="" SET sendTo=%sendTo%,
)
SET sendTo=%sendTo%%sendToCommon%

IF NOT "%sendToCcCommon%"=="" (
    IF NOT "%sendToCc%"=="" SET sendToCc=%sendToCc%,
)
SET sendToCc=%sendToCc%%sendToCcCommon%

REM ==== Exit if sendTo is empty
IF "%sendTo%"=="" GOTO Finish

REM ==== Set sendTo with surrounding quotes
SET sendTo="%sendTo%"

REM ==== Set sendToCc with argument switch and surrounding quotes
IF NOT "%sendToCc%"=="" SET sendToCc=-cc "%sendToCc%"

REM ==== Get svn date and time
FOR /F "tokens=1,2" %%R IN ('"%svnDir%svnlook.exe" date -r %rev% %repos%') DO (
    SET svnDate=%%R
    SET svnTime=%%S
)


REM ==== Set email subject
SET subject=[%reposName%] SVNCommit (%author%) Rev: %rev%

REM ==== Set email body

(
ECHO Dear Developers,
ECHO.

IF NOT "%authorName%"=="" (
    ECHO There is an SVN Commit on  [ %reposName% ]  by %authorName% ^(%author%^).
) ELSE (
    ECHO There is an SVN Commit on  [ %reposName% ]  by %author%.
)

ECHO Please SVN Update your working copy.
ECHO.
ECHO.
ECHO -------------------- SVN Commit Notification --------------------
ECHO Repository:    %reposName%
ECHO Revision:      %rev%
ECHO Author:        %author%
ECHO Date:          %svnDate%      Time: %svnTime%
ECHO.
ECHO -----------------------------------------------------------------
ECHO Log Message:
ECHO -----------------------------------------------------------------
) >%tmpFile%

REM ==== Get svn log
FOR /F "tokens=*" %%R IN ('"%svnDir%svnlook.exe" log -r %rev% %repos%') DO ECHO %%R >>%tmpFile%

REM ==== If the 'no email tag' exists in the log, exit without sending email
IF NOT "%noEmailTag%"=="" (
    FOR /F "tokens=*" %%E IN ('FINDSTR /I /B /C:"%noEmailTag%" %tmpFile%') DO GOTO Finish
)

(
ECHO.
ECHO -----------------------------------------------------------------
ECHO Changes:
ECHO -----------------------------------------------------------------
) >>%tmpFile%

REM ==== Get svn changed
FOR /F "tokens=*" %%R IN ('"%svnDir%svnlook.exe" changed -r %rev% %repos%') DO ECHO %%R >>%tmpFile%

IF NOT "%limitDiff%"=="-1" (
(
ECHO.
ECHO -----------------------------------------------------------------
ECHO Diff: ^(only first %limitDiff% lines shown^)
ECHO -----------------------------------------------------------------
) >>%tmpFile%

REM ==== Get svn diff
FOR /F "tokens=*" %%R IN ('"%svnDir%svnlook.exe" diff -r %rev% %repos% ^| head --lines=%limitDiff%') DO ECHO %%R >>%tmpFile%
)

(
ECHO.
ECHO.
ECHO Regards,
ECHO SVN Server Admin
) >>%tmpFile%


REM ==== Send email
"%emailDir%blat.exe" %tmpFile% -server %emailServer%:%emailPort% -f %emailUid% -u %emailUid% -pw %emailPwd% -from %sendFrom% -to %sendTo% %sendToCc% -subject "%subject%" -try %sendTry%


:Finish
REM ==== Cleanup
IF EXIST %tmpFile% DEL /Q %tmpFile%

2. Set values in the Begin/End Settings section. Put this file inside a folder accessible by all repositories. For instance, If your repository root folder is "D:\svn_repos\", you may put it inside "D:\svn_repos\scripts\".

3. Create another batch file named as "post-commit.bat" with the following contents:

SET repos=%1
SET rev=%2


REM ==== Set repository name for display only, if empty will be same as repos
SET reposName=

REM ==== Set receiver/cc email (comma separated, without quotes and spaces)
SET sendTo=
SET sendToCc=


D:\svn_repos\scripts\weizh-post-commit-email.bat "%repos%" "%rev%" "%reposName%" "%sendTo%" "%sendToCc%"

4. Set the repository's name and receiver/cc emails if any. Change the "D:\svn_repos\scripts" to your path. Put this file inside each repository's "hooks" folder.

Whenever there is a commit, an email will be sent to the relevant recipients with contents such as below:
Dear Developers,

There is an SVN Commit on  [ XXXX ]  by Harry Smith (harry).
Please SVN Update your working copy.


-------------------- SVN Commit Notification --------------------
Repository:    XXXX
Revision:      139
Author:        harry
Date:          2011-10-01      Time: 19:53:53

-----------------------------------------------------------------
Log Message:
-----------------------------------------------------------------
Added and modified on some stuff.

-----------------------------------------------------------------
Changes:
-----------------------------------------------------------------
U  Trunk/Foo/
U  Trunk/Foo/Foo.csproj
A  Trunk/Foo/Helper.cs
U  Trunk/Foo/Customer.cs
U  Trunk/Foo/Properties/AssemblyInfo.cs
D  Trunk/Foo/Test.txt


Regards,
SVN Server Admin

If you find this post helpful, would you buy me a coffee?


Thursday, August 27, 2009

Subversion: Client: Installation and Guidelines

This is the third section of the Subversion topic. The first and second sections can be found here and here.

Note: This topic is more like a walk-through than a complete guidelines. And is basically based on the great documentations found on the TortoiseSVN website and various sources. You can refer the site for more explanation if needed.

Client: Installation and Guidelines

Part 1: Installation
  1. Install TortoiseSVN (e.g. TortoiseSVN-1.4.X.XXXX-win32-svn-1.4.X.msi).
    • After installed, right click > Settings > General >
    • Tick Use "_svn" instead of ".svn" directories
    • Tick Set fildates to the "last commit times"

Part 2: Importing Data Into A Repository and Checking Out From A Repository
  1. Before importing, please organize the project folder and take away unused files that are not needed to build the project.
  2. Right-click on the (top-level) project folder, select TortoiseSVN > Import. All the contents of the folder will be imported into the repository, under version control.
  3. The project folder used for importing is unversioned and cannot be used for "Check Out" (See "Check Out A Working Copy" below). If the project folder (source tree) is also used as the working copy, you have to either:
    • After the folder is imported into the repository, delete the folder, then do "Check Out" to a new folder with the same name, or
    • "Check Out" to a different folder, or
    • "Check Out" to an empty folder, then copy the content to the folder. Select TortoiseSVN > Add to add the files needed for version control. Then TortoiseSVN > Commit.
  4. Check Out A Working Copy (client):
    • To obtain a working copy from a repository. Only can check out into an empty folder.
    • Right-click on an empty folder > SVN Checkout
    • Can be perfomed on a sub-directory path instead of the whole repository path. Then the client only need to check out on the part that needed (e.g. trunk only).
    • The "Check Out" folder contents are now under version control.
  5. If certain folders/files need to be ignored, select TortoiseSVN > Add to ignore list, or TortoiseSVN > Properties, Add "svn:ignore", put the ignore pattern. E.g.:
  6. [Bb][Aa][Cc][Kk][Uu][Pp] [Uu][Nn][Uu][Ss][Ee] [Uu][Nn][Uu][Ss][Ee][Dd] *.[Bb][Aa][Kk] *.[Tt][Bb][Kk] *.[Ee][Xx][Ee] *.[Ee][Xx][Ee][1_]
Part 3: Daily Use Guide
  1. All TortoiseSVN commands are accessed with right-clicking on a file or folder. The versioned folder contents will be indicated with icon overlays. TortoiseSVN also provide right-drag functions.
  2. Checking The Working Copy:
    • Right-click > TortoiseSVN > Check for modifications (To see changes in the client)
    • Click "Check Repository" to see changes in the server
  3. Update The Working Copy:
    • Right-click > SVN Update (update the client)
    • Default update is from the repository's HEAD revision.
    • To update from a different revision (not recommended), select TortoiseSVN > Update to revision.
    • Note: SVN will never overwrite unversioned files.
  4. Commit Changes To The Repository:
    • Select any file/folder, right-click > SVN Commit > Select the changed files to be commited.
    • Only commit if the working copy is up-to-date and there are no conflicts.
    • Optionally, write a log message to describe the changes.
    • Optionally, files/folders can be ignored, refer here
  5. If there are conflicts during update or commit, either:
    • Double-click/right-click on the file to launch the diff/merge tool to show the changes (only for non-binary files), or
    • Manual checking and resolving the problem, or
    • TortoiseSVN > Resolve, to commit overwrite the repository, or
    • TortoiseSVN > Revert, to update overwrite the client
    • Refer: here
  6. To Add/Delete/Rename on version controlled files/folders, etiher:
    • Modify as usual in Windows Explorer, or
    • Right-click > TortoiseSVN > Add/Delete/Rename
  7. To undo changes in client:
    • TortoiseSVN > Revert, to update overwrite the client.
Reference: File Version Used:
Subversion (svn): 1.4.5
TortoiseSVN: 1.4.8.12137 (win32)
Cygwin: 1.5.25-14
Putty, Puttygen, Pageant: 0.60


If you find this post helpful, would you buy me a coffee?


Saturday, August 16, 2008

Subversion: Server: Setting Up Svnserve With SSH

This is the second section of the Subversion topic. The first section can be found here.

Note: This topic is more like a walk-through than a complete guidelines. And is basically based on the great documentations found on the TortoiseSVN website and various sources. You can refer the site for more explanation if needed.

Server: Setting Up Svnserve With SSH

Part 1: Server Setup
  1. Login as Administrator.
  2. Install SVN on the server (as described in Setting Up Svnserve).
    • Close the svnserve service if it is running.
  3. Create a new user account named “svnuser” (or any other name) with a password. Check that the user permissions are sufficient to read and write your SVN repository directory on the server.
  4. Install Cygwin SSH daemon as described here.
    • Before step 5 (“ssh-host-config” section), open c:\cygwin\etc\hosts.allow with WordPad, make sure it looks like this (take note the hash #):
      #ALL : PARANOID : deny
      sshd: ALL
    • Continue to do the “ssh-host-config” section.
    • Continue to do the “Test the sshd” section.
      • Also test on “ssh svnuser@localhost”
    • Skip the other sections unless specially needed.
    • Type “logout” untill the cygwin window is closed.
  5. Download PuTTY, PuTTYgen and Pageant from here and place the EXEs in c:\cygwin
  6. In Windows, logout as Administrator, then login as svnuser.
  7. Create a key pair (Replace the ‘svnharrykey’ in sample below with your preferred key name):
    • Open a cygwin window. Will be logged in as svnuser by default.
    • $ cd /home/svnuser
      $ mkdir .ssh
      $ ssh-keygen -t rsa -f svnharrykey.key
    • Enter a passphrase: a secret key for private key encryption
      • The key pair will be created in c:\cygwin\home\svnuse
    • If authorized_keys not exist (first time create):$ cp svnharrykey.key.pub /home/svnuser/.ssh/authorized_keysIf authorized_keys already exist:$ cat svnharrykey.key.pub >> /home/svnuser/.ssh/authorized_keys
    • Double-click on c:\cygwin\puttygen.exe
    • Goto Conversions > Import Key > Select the svnharrykey.key file.
    • Enter the passphrase > Save private key > saved as svnharrykey.ppk (saved into the same folder).
    • Goto c:\cygwin\home\svnuser\.ssh and open “authorized_keys” file with WordPad.
      • Append the following line (in blue & red) to the top of each authorized key:
        command="svnserve -t -r d:/svn_repos/ --tunnel-user=harry",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty ssh-rsa <ThePublicKey><PublicKeyComment>
      • Replace the text in red to your svn repository root folder and svn authorized user (as in your svn repository conf\authz file).
      • Note: If “svnserve” command cannot be found, change it to full path. E.g: command="c:/svnserve/bin/svnserve.exe –t –r d:/svn_repos/…
      • Note: The user read/write right of the svn repository will follow as set in conf\authz. (conf\passwd will not be used)
      • Save the file.

    • Repeat steps above to generate keys for each svn authorized user.
      • Note: Recommended each svn user should have a different key pair and passphrase.
    • After complete, copy all the .ppk keys in c:\cygwin\home\svnuser to another folder to be distributed to the clients.
    • In Windows, logout as svnuser, then login back as Administrator.

  8. Distribute the Putty private key files (e.g. svnharrykey.ppk) created to the authorized clients.
  9. To restrict access to the ssh service:
    • In Windows, login as Administrator.
    • Open c:\cygwin\etc\hosts.allow with WordPad.
    • Put a hash (#) on this line:
      #sshd: ALL
    • Put the following lines:
      ALL : PARANOID : deny
      ALL : PARANOID : RFC931 20 : deny
      ALL : localhost 127.0.0.1 : allow
      sshd : 192.168.1. : allow
      sshd : 218.208.999.99: allow

      ALL : ALL : deny
    • Note:
      • Replace the IPs in blue to those you allow.
      • Rules applies in the first-come-first-serve order.
      • To allow an IP range: sshd : 192.168.1. : allow
      • To allow a particular IP: sshd : 192.168.1.47: allow
      • To allow a domain: sshd : .mydomain.com : allow
    • Save the file. The changes will take effect immediately.

Part 2: Client Setup
  1. Copy or download PuTTY and Pageant (from here) and place the EXEs in any folder (e.g. d:\_svnuse)
  2. Put the Putty private key (e.g. svnharrykey.ppk) into the same folder.
  3. Double-click on putty.exe to create a new session:
    • Session:
      • HostName: Username @ Hostname/IP of the server (e.g. svnuser@myhost.com)
      • Protocol: SSH
      • Saved Sessions: Any name (e.g. svnsession)
    • Connection: SSH:
      • Prefered SSH Protocol version: 2
    • Go back to Session node, click save. Close the program.
  4. In the same folder, create a batch file named “runpageant.bat”, put the following line (replace with your paths and private key name):
    start "Pageant" "d:\_svnuse\pageant.exe" d:\_svnuse\svnharrykey.ppk
  5. Create a shortcut of runpageant.bat and drag it into All Programs > Startup.
  6. When the runpageant.bat is executed, key in the passphrase when prompted.
  7. Accessing svn repository via TortoiseSvn:
    • Using the address as below:
      • svn+ssh://svnsession/Repo_ProjectName/Trunk
Reference: File Version Used:
Subversion (svn): 1.4.5
TortoiseSVN: 1.4.8.12137 (win32)
Cygwin: 1.5.25-14
Putty, Puttygen, Pageant: 0.60


Additional Resources:
Subversion: Post-Commit Email Notification



If you find this post helpful, would you buy me a coffee?


Thursday, July 17, 2008

Subversion: Server: Setting up Svnserve

Subversion (SVN) is a version control system that is gaining wide popularity. I've been using TortoiseSVN as the client, which is easy to use and setup. However, I find that setting up the Subversion server (svnserve based) is not that straight-forward (although not really that difficult as well).

As such, based on my own experience, I've compiled a step-by-step guide to setup the svnserve based Subversion server, that could be useful for future use.

Note: This topic is more like a walk-through than a complete guidelines. And is basically based on the great documentations found on the TortoiseSVN website and various sources. You can refer the site for more explanation if needed.

This topic is separated into 3 sections:
  1. Server: Setting Up Svnserve
  2. Server: Setting Up Svnserve With SSH
  3. Client: Installation and Guidelines
Server: Setting Up Svnserve

Part 1: Installation

Note
: The following guide assumes the server's
- svnserve is installed in c:\svnserve\
- root folder for all repositories is in d:\svn_repos

  1. In Windows, login as Administrator.
  2. Install SvnServe (get the latest version from here).
    • If manual install:
      • Manually create a folder c:\svnserve\
      • Unzip and copy all the files/folders into the folder.
  3. Run the SvnServe:
    • If install as a service (automatically started when Windows starts): sc create svnserve binpath= "c:\svnserve\bin\svnserve.exe --service --root d:\svn_repos\" displayname= "Subversion" depend= tcpip start=auto obj= "NT AUTHORITY\LocalService"
    • If manual run, create and run a batch file (e.g. svnserver_service.bat):c:\svnserve\bin\svnserve.exe --daemon --root d:\svn_repos\
  4. Install TortoiseSVN (get the latest version from here).
    • Optionally, after installed, right click > Settings > General
    • Tick Use "_svn" instead of ".svn" directories
    • Tick Set fildates to the "last commit times"
  5. Create a root folder for all repositories in d:\svn_repos\.
  6. Create a repository trunk folder for the relavant project inside the root folder. (e.g. d:\svn_repos\Repo_Project1\Trunk)
  7. Right click on the folder and select TortoiseSVN -> Create Repository here.
    • Choose Native Filesystem (FSFS)
    • Do NOT choose Berkeley DB, especially use on a network share.
    • Do NOT modify the contents of the repository folder yourself.
  8. Authentication (modify and save with a Notepad):
    • Modify the 'svnserve.conf' file in the repository 'conf' folder (e.g. d:\svn_repos\Repo_Project1\Trunk\conf).
    • Paste the following after the last line:
      anon-access = none
      auth-access = write
      password-db = passwd
      authz-db = authz
    • Modify the 'passwd' file in the same folder to set user name and password.
      • Put your user-password pair after the last line. E.g.:
        harry = harrypassword
        user1 = user1password
    • Modify the 'authz' file in the same folder to set the path-based access control:
      • Put your user-authorize pair after the last line (r = read, w= write). E.g.:
        [/]
        harry = rw
        user1 = r
        * =
  9. Test (make sure the svnserve service is running): Anywhere in Windows Explorer, right click > TortoiseSVN > Repo-Browser to view a repository (e.g. svn://localhost/Repo_Project1/Trunk). Type the username and password when prompted.
  10. Optional: To create a backup copy of the repository:
    • In DOS prompt, type: svnadmin hotcopy path/to/repository path/to/backup --clean-logs
  11. Optional: Setup SvnServe using SSH. Refer the Setting up Svnserve with SSH.
Reference source: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup-svnserve.html

Part 2: Repository Layout
  1. The repository basic folder structure can be created by:
    • Creating an empty folder with the folder structure inside, then TortoiseSVN > Import, or
    • Using TortoiseSVN repository browser
  2. It is recommended to create separate repositories for 'each' project. This allows independent development and to keep track on the repository's revision number.
  3. The recommended directory structure:
    • trunk : To hold the "main line" of development
    • branches : Contain branch copies
    • tags : Contain tags copies
    • For details, refer here.
Reference source: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-import.html

Reference: File Version Used:
Subversion (svn): 1.4.5
TortoiseSVN: 1.4.8.12137 (win32)


Additional Resources:
Subversion: Post-Commit Email Notification



If you find this post helpful, would you buy me a coffee?