Mercurial > hg > hg-git
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 <durham@fb.com> |
---|---|
date | Mon, 24 Aug 2015 19:31:52 -0700 |
parents | f7d0175264ce |
children | d46938925708 |
files | hggit/__init__.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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):