comparison mercurial/hg.py @ 14555:1ceb2cf9f9d9

hg: have peer() call _lookup directly Note that this means that peers no longer call the extension repository setup hooks.
author Matt Mackall <mpm@selenic.com>
date Fri, 10 Jun 2011 11:43:38 -0500
parents 68db17047637
children 517e1d88bf7e
comparison
equal deleted inserted replaced
14554:68db17047637 14555:1ceb2cf9f9d9
99 return repo 99 return repo
100 100
101 def peer(ui, opts, path, create=False): 101 def peer(ui, opts, path, create=False):
102 '''return a repository peer for the specified path''' 102 '''return a repository peer for the specified path'''
103 rui = remoteui(ui, opts) 103 rui = remoteui(ui, opts)
104 return repository(rui, path, create) 104 return _lookup(path).instance(rui, path, create)
105 105
106 def defaultdest(source): 106 def defaultdest(source):
107 '''return default destination of clone if none is given''' 107 '''return default destination of clone if none is given'''
108 return os.path.basename(os.path.normpath(source)) 108 return os.path.basename(os.path.normpath(source))
109 109