equal
deleted
inserted
replaced
121 '''return a repository peer for the specified path''' |
121 '''return a repository peer for the specified path''' |
122 rui = remoteui(uiorrepo, opts) |
122 rui = remoteui(uiorrepo, opts) |
123 return _peerorrepo(rui, path, create).peer() |
123 return _peerorrepo(rui, path, create).peer() |
124 |
124 |
125 def defaultdest(source): |
125 def defaultdest(source): |
126 '''return default destination of clone if none is given''' |
126 '''return default destination of clone if none is given |
|
127 |
|
128 >>> defaultdest('foo') |
|
129 'foo' |
|
130 >>> defaultdest('/foo/bar') |
|
131 'bar' |
|
132 >>> defaultdest('/') |
|
133 '' |
|
134 >>> defaultdest('') |
|
135 '.' |
|
136 >>> defaultdest('http://example.org/') |
|
137 '.' |
|
138 >>> defaultdest('http://example.org/foo/') |
|
139 'foo' |
|
140 ''' |
127 return os.path.basename(os.path.normpath(util.url(source).path or '')) |
141 return os.path.basename(os.path.normpath(util.url(source).path or '')) |
128 |
142 |
129 def share(ui, source, dest=None, update=True): |
143 def share(ui, source, dest=None, update=True): |
130 '''create a shared repository''' |
144 '''create a shared repository''' |
131 |
145 |