From 2dc11594d5b95d876c9997ca40dfb08bf06c830b Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 23 Oct 2014 17:33:49 +0100 Subject: Rework CachedRepo to use the GitDirectory class where possible This consolidates a bunch of code paths that were previously duplicated. This also changes the API for local cached repos to match the function names GitDirectory uses. Note that the remote repo cache still uses the old names, and should be fixed when time permits. Some unit tests that use the CachedRepo module required a bit of inelegant monkey-patching in order that they continue to work. A better way to do this would be with the 'mock' library (which would need to be added to Baserock 'build' and 'devel' systems before we could use it). --- tests.build/missing-ref.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests.build') diff --git a/tests.build/missing-ref.stderr b/tests.build/missing-ref.stderr index 5fa5456b..b5139e25 100644 --- a/tests.build/missing-ref.stderr +++ b/tests.build/missing-ref.stderr @@ -1 +1 @@ -ERROR: Ref non-existent-branch is an invalid reference for repo file://TMP/morphs-repo +ERROR: Git directory TMP/morphs-repo has no commit at ref non-existent-branch^{commit}. -- cgit v1.2.1