diff --git a/hggit/__init__.py b/hggit/__init__.py index fdb8065e2eacce89bebb45b366acd492eb3a59dc_aGdnaXQvX19pbml0X18ucHk=..9f5a7a5d52aa2cdf17337a8c6f9d2d2ddbf4fa68_aGdnaXQvX19pbml0X18ucHk= 100644 --- a/hggit/__init__.py +++ b/hggit/__init__.py @@ -36,6 +36,12 @@ if (os.path.exists(os.path.join(p, '.git')) and not os.path.exists(os.path.join(p, '.hg'))): return gitrepo + # detect a bare repository + if (os.path.exists(os.path.join(p, 'HEAD')) and + os.path.exists(os.path.join(p, 'objects')) and + os.path.exists(os.path.join(p, 'refs')) and + not os.path.exists(os.path.join(p, '.hg'))): + return gitrepo return _oldlocal(path) hg.schemes['file'] = _local