From d14f7c7720d9a27cb3f96e743cf41dadb1942c0a Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Tue, 1 Nov 2011 21:36:46 -0400 Subject: [PATCH] fix mercurial diffs, should change to cloned repo first --- src/lib/Hydra/Controller/API.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/API.pm b/src/lib/Hydra/Controller/API.pm index 5a67b39c..69d85f7c 100644 --- a/src/lib/Hydra/Controller/API.pm +++ b/src/lib/Hydra/Controller/API.pm @@ -217,7 +217,7 @@ sub scmdiff : Chained('api') PathPart('scmdiff') Args(0) { if($type eq "hg") { my $clonePath = scmPath . "/" . sha256_hex($uri); die if ! -d $clonePath; - $branch = `hg log --template '{branch}' -r $rev2`; + $branch = `(cd $clonePath ; hg log --template '{branch}' -r $rev2)`; $diff .= `(cd $clonePath ; hg log -r $rev1 -r $rev2 -b $branch)`; $diff .= `(cd $clonePath ; hg diff -r $rev1:$rev2)`; } elsif ($type eq "git") {