Created
July 12, 2011 13:22
-
-
Save jpoehls/1077968 to your computer and use it in GitHub Desktop.
Hg-Export # PS function to export a diff file of uncommitted changes in the working repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Hg-Export([string]$Path) { | |
<# | |
.SYNOPSIS | |
Exports all uncommitted changes in the current HG repository | |
to a git formatted diff file at the specified path. | |
The resultant diff file can be re-imported into a repo using: hg import changes.diff | |
.EXAMPLE | |
Hg-Export changes.diff | |
# equivelant to: hg diff --git | Out-File changes.diff -Encoding ASCII; hg diff --stat | |
#> | |
hg diff --git | Out-File $Path -Encoding UTF8 | |
hg diff --stat | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment