File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -220,9 +220,9 @@ def to_url(self) -> str:
220
220
Examples
221
221
--------
222
222
223
- >>> hg_location = HgURL(url='https://hg.mozilla.org/mozilla-central')
223
+ >>> hg_url = HgURL(url='https://hg.mozilla.org/mozilla-central')
224
224
225
- >>> hg_location
225
+ >>> hg_url
226
226
HgURL(url=https://hg.mozilla.org/mozilla-central,
227
227
scheme=https,
228
228
hostname=hg.mozilla.org,
@@ -231,17 +231,17 @@ def to_url(self) -> str:
231
231
232
232
Switch repo libvcs -> vcspull:
233
233
234
- >>> hg_location .path = 'mobile-browser'
234
+ >>> hg_url .path = 'mobile-browser'
235
235
236
- >>> hg_location .to_url()
236
+ >>> hg_url .to_url()
237
237
'https://hg.mozilla.org/mobile-browser'
238
238
239
239
Switch them to localhost:
240
240
241
- >>> hg_location .hostname = 'localhost'
242
- >>> hg_location .scheme = 'http'
241
+ >>> hg_url .hostname = 'localhost'
242
+ >>> hg_url .scheme = 'http'
243
243
244
- >>> hg_location .to_url()
244
+ >>> hg_url .to_url()
245
245
'http://localhost/mobile-browser'
246
246
247
247
Another example, `hugin <http://hugin.hg.sourceforge.net>`_:
Original file line number Diff line number Diff line change @@ -211,11 +211,11 @@ def to_url(self) -> str:
211
211
Examples
212
212
--------
213
213
214
- >>> svn_location = SvnURL(
214
+ >>> svn_url = SvnURL(
215
215
... url='svn+ssh://my-username@my-server/vcs-python/libvcs'
216
216
... )
217
217
218
- >>> svn_location
218
+ >>> svn_url
219
219
SvnURL(url=svn+ssh://my-username@my-server/vcs-python/libvcs,
220
220
scheme=svn+ssh,
221
221
user=my-username,
@@ -225,16 +225,16 @@ def to_url(self) -> str:
225
225
226
226
Switch repo libvcs -> vcspull:
227
227
228
- >>> svn_location .path = 'vcs-python/vcspull'
228
+ >>> svn_url .path = 'vcs-python/vcspull'
229
229
230
- >>> svn_location .to_url()
230
+ >>> svn_url .to_url()
231
231
'svn+ssh://my-username@my-server/vcs-python/vcspull'
232
232
233
233
Switch user to "tom":
234
234
235
- >>> svn_location .user = 'tom'
235
+ >>> svn_url .user = 'tom'
236
236
237
- >>> svn_location .to_url()
237
+ >>> svn_url .to_url()
238
238
'svn+ssh://tom@my-server/vcs-python/vcspull'
239
239
"""
240
240
parts = [self .scheme or "ssh" , "://" ]
You can’t perform that action at this time.
0 commit comments