changeset 937:f05962b0e78a

paths: mark git repos as valid paths The latest version of Mercurial validates that a path contains the .hg directory. This breaks when pulling/pushing to git repos. This patch makes a gitrepo a valid path as well.
author Durham Goode <>
date Mon, 24 Aug 2015 19:31:52 -0700
parents f7d0175264ce
children d46938925708
files hggit/
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/
+++ b/hggit/
@@ -275,6 +275,12 @@
     return newpeer
 extensions.wrapfunction(hg, 'peer', peer)
+def isvalidlocalpath(orig, self, path):
+    return orig(self, path) or _isgitdir(path)
+if (hgutil.safehasattr(hgui, 'path') and
+    hgutil.safehasattr(hgui.path, '_isvalidlocalpath')):
+    extensions.wrapfunction(hgui.path, '_isvalidlocalpath', isvalidlocalpath)
 def exchangepull(orig, repo, remote, heads=None, force=False, bookmarks=(),