From 3b79ab4c2bd73de365460349830912a44e23f4e2 Mon Sep 17 00:00:00 2001
From: David Ludwig <dludwig@pobox.com>
Date: Wed, 2 Dec 2015 07:58:23 -0500
Subject: [PATCH] WinRT: allowed NuGet packaging code to get hg revision
 regardless of cwd

---
 build-scripts/winrtbuild.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-scripts/winrtbuild.ps1 b/build-scripts/winrtbuild.ps1
index a218b9d62..337780955 100644
--- a/build-scripts/winrtbuild.ps1
+++ b/build-scripts/winrtbuild.ps1
@@ -248,7 +248,7 @@ if ($DidAnyDLLBuildFail -eq $true) {
         Write-Host -ForegroundColor Cyan "... via NuGet install: $NugetPath"
         $NugetOutputDir = "$PSScriptRoot\..\VisualC-WinRT\lib\nuget"
         Write-Host -ForegroundColor Cyan "...  output directory: $NugetOutputDir"
-        $SDLHGRevision = $($(hg log -l 1 | select-string "changeset") -Replace "changeset:\W*(\d+).*",'$1') 2>$null
+        $SDLHGRevision = $($(hg log -l 1 --repository "$PSScriptRoot\.." | select-string "changeset") -Replace "changeset:\W*(\d+).*",'$1') 2>$null
         Write-Host -ForegroundColor Cyan "...       HG Revision: $SDLHGRevision"
 
         # Base options to nuget.exe