I am messing around with the paths section of my .hgrc
, and have default
and default:pushurl
set. I am adding another path simply called def
for now, that is essentially http://example.com/hg
. Each repository, however, is a subdirectory of this site, i.e. http://example.com/hg/myrepo
. Is there some way to push and pull using def
as the first part of the URL? I'd imagine it would look something like hg pull def/myrepo
, but this particular syntax doesn't work of course. Thanks in advance.
Asked
Active
Viewed 32 times
2

17slim
- 1,233
- 1
- 16
- 21
1 Answers
2
Yes, this is possible with the Schemes extension.
Add the following to your .hgrc:
[extensions]
hgext.schemes=
[schemes]
def = http://example.com/hg/
Then you'll be able to do hg push def://myrepo
.

ngoldbaum
- 5,430
- 3
- 28
- 35
-
Thanks for your answer, this looks like exactly what I want. However, I added the two lines and now get `abort: no '://' in scheme url 'def:myrepo'`. Is there some different formatting I must use? – 17slim Jul 11 '17 at 14:11
-
Ah, figured it out. The url for `def` must have a trailing `/`. – 17slim Jul 11 '17 at 14:27
-
Oh, and one more thing. When doing `hg push` or `hg pull`, the syntax is `def://myrepo`. – 17slim Jul 11 '17 at 14:35