1
votes

Basically, I'm trying to serve (hg serve) my local repository and clone the same.

When I gave "hg clone http://localhost:8000/" (the served URL), I got "abort: HTTP Error 403: Forbidden"

When I did "unset http_proxy", tried again, abort: empty destination path is not valid popped up!

Why does it happen? Are there any prerequisites to be done in hgrc or any config files before the cloning?

2

2 Answers

2
votes
hg clone http://localhost:8000/ .

Specifying the destination viz.current working directory(.) solved it.

0
votes

There's no prior setup required:

(df)Ry4ans-MacBook-Air:www ry4an$ cd /tmp
(df)Ry4ans-MacBook-Air:tmp ry4an$ hg init janani ; cd janani ; hg serve &
[1] 22358
(df)Ry4ans-MacBook-Air:janani ry4an$ listening at http://Ry4ans-MacBook-Air.local:8000/ (bound to *:8000)

(df)Ry4ans-MacBook-Air:janani ry4an$ cd ..
(df)Ry4ans-MacBook-Air:tmp ry4an$ hg clone http://localhost:8000/ janani-clone
127.0.0.1 - - [24/Feb/2015 14:24:39] "GET /?cmd=capabilities HTTP/1.1" 200 -
127.0.0.1 - - [24/Feb/2015 14:24:39] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
127.0.0.1 - - [24/Feb/2015 14:24:39] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D
no changes found
127.0.0.1 - - [24/Feb/2015 14:24:39] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved

Could it be that you already have a different server listening on port 8000, so your hg serve isn't getting the connections?