Skip to content

Instantly share code, notes, and snippets.

@JonBons
Created March 25, 2015 18:08
Show Gist options
  • Save JonBons/e1a4cad162dc691a05a1 to your computer and use it in GitHub Desktop.
Save JonBons/e1a4cad162dc691a05a1 to your computer and use it in GitHub Desktop.
HG: update to branch
function UpdateToBranch {
$return = hg branches | Select-String $args
Write-Host $return
if (($return | Measure-Object).Count -eq 1) {
'Updating to branch...'
$line = $return.ToString().Trim()
$line = $line -replace " ([0-9]*?):(.*?)$", ""
hg update "$line"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment