--- a/hg/hgrc.go Fri Nov 13 20:56:05 2020 -0600
+++ b/hg/hgrc.go Fri Nov 13 21:42:29 2020 -0600
@@ -40,7 +40,7 @@
ret = append(ret, filepath.Join(adminPath, "config", repoName, "hgrc"))
+ if repoName == "." || repoName == "" { repoName = filepath.Dir(repoName)
--- a/hg/hgrc_test.go Fri Nov 13 20:56:05 2020 -0600
+++ b/hg/hgrc_test.go Fri Nov 13 21:42:29 2020 -0600
@@ -6,7 +6,7 @@
"github.com/stretchr/testify/assert"
-func TestFindHgrcsForRepo(t *testing.T) {
+func TestFindHgrcsForRepoSimple(t *testing.T) { actual := findHgrcsForRepo("grim/hgkeeper")
@@ -16,3 +16,21 @@
assert.Equal(t, expected, actual)
+func TestFindHgrcsForRepoEmpty(t *testing.T) { + actual := findHgrcsForRepo("") + assert.Equal(t, expected, actual) +func TestFindHgrcsForRepoDot(t *testing.T) { + actual := findHgrcsForRepo(".") + assert.Equal(t, expected, actual)