comparison mercurial/hg.py @ 14839:510c893a726f

peer: change arg name to convey it can be a repo as well
author Idan Kamara <idankk86@gmail.com>
date Tue, 05 Jul 2011 14:28:55 +0300
parents de9eb6b1da4f
children 4c523a2af6e7
comparison
equal deleted inserted replaced
14838:5d261fd00446 14839:510c893a726f
96 hook = getattr(module, 'reposetup', None) 96 hook = getattr(module, 'reposetup', None)
97 if hook: 97 if hook:
98 hook(ui, repo) 98 hook(ui, repo)
99 return repo 99 return repo
100 100
101 def peer(ui, opts, path, create=False): 101 def peer(uiorrepo, 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(uiorrepo, opts)
104 return repository(rui, path, create) 104 return repository(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))