tags:

views:

37

answers:

1

When a project is started with

mkdir proj
cd proj
hg init
[create some files]
hg add file.txt
hg commit
hg push ssh://[email protected]/proj

now when hg path is issued, nothing will show. How do we actually change the repository so that it is as if it is cloned from [email protected]/proj ? Is it just by editing .hg/hgrc and adding

[paths]
default = ssh://[email protected]/proj

because that feels like too low level an operation to do (by editing a text file)

+4  A: 

It's the only way to do it in this situation. There are plenty of other cases where you have to edit the hgrc by hand, like setting up hooks or enabling extensions, so it's not as if it's unusual.

(As you probably already know, hg clone will set the path entry in the clone to point back to the original.)

Niall C.
Here's Mercurial's primary author on the subject: http://twitter.com/mpmselenic/status/8392230762
Ry4an