Tuesday, 17 March 2015

Powershell & Tortoise SVN

# Helper function for opening the Tortoise SVN GUI from a PowerShell prompt.
# Put this into your PowerShell profile.
# Ensure Tortoise SVN is in your PATH (usually C:\Program Files\TortoiseSVN\bin) 
function Svn-Tortoise([string]$Command = "commit") {
<#
.SYNOPSIS
  Launches TortoiseSVN with the given command.
  Opens the commit screen if no command is given.
  
  List of supported commands can be found at:
  http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-automation.html
#>
  TortoiseProc.exe /command:$Command /path:"$pwd"
}
Set-Alias tsvn "Svn-Tortoise"
 
 
To use keywords in a file you insert a keyword anchor, which is simply a keyword sandwiched between two dollar signs, e.g. $Date$ or $Id$. The table displays the available keywords, some of which have aliases. You can use either the main keyword or its alias interchangeably in a keyword anchor. 

Keyword
Alias
Meaning
Date
LastChangedDate
Date of last known commit; date in local time.
Revision
LastChangedRevision
Revision of last known commit.
Author
LastChangedBy
Last known user to commit.
HeadURL
URL
URL to latest version of the file in the repository.
Id
none
Abbreviated combination of other 4 keywords; date in UTC time.
Header
none
Same as Id except the URL is not abbreviated.
 

No comments:

Post a Comment