comparison hgsubversion/__init__.py @ 505:e508a718779c

fallback to the previous scheme for file repositories. This improves compatibility with hg-git.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sun, 13 Dec 2009 17:15:01 +0100
parents bc117ea4c95a
children b5f24dd948af
comparison
equal deleted inserted replaced
504:bc117ea4c95a 505:e508a718779c
143 143
144 def reposetup(ui, repo): 144 def reposetup(ui, repo):
145 if repo.local(): 145 if repo.local():
146 svnrepo.generate_repo_class(ui, repo) 146 svnrepo.generate_repo_class(ui, repo)
147 147
148 148 _old_local = hg.schemes['file']
149 def _lookup(url): 149 def _lookup(url):
150 if util.islocalrepo(url): 150 if util.islocalrepo(url):
151 return svnrepo 151 return svnrepo
152 else: 152 else:
153 return hg._local(url) 153 return _old_local(url)
154 154
155 # install scheme handlers 155 # install scheme handlers
156 hg.schemes.update({ 'file': _lookup, 'http': svnrepo, 'https': svnrepo, 156 hg.schemes.update({ 'file': _lookup, 'http': svnrepo, 'https': svnrepo,
157 'svn': svnrepo, 'svn+ssh': svnrepo, 'svn+http': svnrepo, 157 'svn': svnrepo, 'svn+ssh': svnrepo, 'svn+http': svnrepo,
158 'svn+https': svnrepo}) 158 'svn+https': svnrepo})