# HG changeset patch # User Durham Goode <durham@fb.com> # Date 1440469912 25200 # Mon Aug 24 19:31:52 2015 -0700 # Node ID f05962b0e78a3ca2638ea835e7847fb638c9b576 # Parent f7d0175264ce55d975665c13e2dcf648254a01f8 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. diff --git a/hggit/__init__.py b/hggit/__init__.py --- a/hggit/__init__.py +++ b/hggit/__init__.py @@ -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) + @util.transform_notgit def exchangepull(orig, repo, remote, heads=None, force=False, bookmarks=(), **kwargs):