##// END OF EJS Templates
hg: add peer method
Matt Mackall -
r14554:68db1704 default
parent child Browse files
Show More
@@ -5,7 +5,7 b''
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 import parser, error, match
8 import parser, error
9 from i18n import _
9 from i18n import _
10
10
11 elements = {
11 elements = {
@@ -98,6 +98,11 b" def repository(ui, path='', create=False"
98 hook(ui, repo)
98 hook(ui, repo)
99 return repo
99 return repo
100
100
101 def peer(ui, opts, path, create=False):
102 '''return a repository peer for the specified path'''
103 rui = remoteui(ui, opts)
104 return repository(rui, path, create)
105
101 def defaultdest(source):
106 def defaultdest(source):
102 '''return default destination of clone if none is given'''
107 '''return default destination of clone if none is given'''
103 return os.path.basename(os.path.normpath(source))
108 return os.path.basename(os.path.normpath(source))
General Comments 0
You need to be logged in to leave comments. Login now